global-functions: $CertificateDownload: remove with find...

... to make sure this does not break when the file does no longer
exist. Starting with RouterOS 7.15rc1 the file is automatically
removed on import.
This commit is contained in:
Christian Hesse 2024-04-19 11:34:35 +02:00
parent b0cd53f813
commit 0f2a4aedab

View file

@ -151,7 +151,7 @@
$WaitForFile $FileName;
/certificate/import file-name=$FileName passphrase="" as-value;
:delay 1s;
/file/remove $FileName;
/file/remove [ find where name=$FileName ];
:foreach Cert in=[ /certificate/find where name~("^" . $FileName . "_[0-9]+\$") ] do={
$CertificateNameByCN [ /certificate/get $Cert common-name ];