From 0f2a4aedab31a7f697158d3d34ac6ce08756ebce Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Fri, 19 Apr 2024 11:34:35 +0200 Subject: 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. --- global-functions.rsc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/global-functions.rsc b/global-functions.rsc index 3b9f27c..66765bf 100644 --- a/global-functions.rsc +++ b/global-functions.rsc @@ -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 ]; -- cgit v1.2.3-70-g09d2