mirror of
https://github.com/eworm-de/routeros-scripts
synced 2024-05-14 08:04:19 +00:00
global-functions: $CertificateDownload: use $LogPrintExit
This commit is contained in:
parent
7cdeb9185e
commit
596fb5f835
1 changed files with 4 additions and 3 deletions
|
@ -88,11 +88,12 @@
|
||||||
:global ScriptUpdatesUrlSuffix;
|
:global ScriptUpdatesUrlSuffix;
|
||||||
|
|
||||||
:global CertificateNameByCN;
|
:global CertificateNameByCN;
|
||||||
|
:global LogPrintExit;
|
||||||
:global UrlEncode;
|
:global UrlEncode;
|
||||||
:global WaitForFile;
|
:global WaitForFile;
|
||||||
|
|
||||||
:log info ("Downloading and importing certificate with " . \
|
$LogPrintExit info ("Downloading and importing certificate with " . \
|
||||||
"CommonName \"" . $CommonName . "\".");
|
"CommonName \"" . $CommonName . "\".") false;
|
||||||
:do {
|
:do {
|
||||||
:local LocalFileName ($CommonName . ".pem");
|
:local LocalFileName ($CommonName . ".pem");
|
||||||
:local UrlFileName ([ $UrlEncode $CommonName ] . ".pem");
|
:local UrlFileName ([ $UrlEncode $CommonName ] . ".pem");
|
||||||
|
@ -108,7 +109,7 @@
|
||||||
$CertificateNameByCN [ / certificate get $Cert common-name ];
|
$CertificateNameByCN [ / certificate get $Cert common-name ];
|
||||||
}
|
}
|
||||||
} on-error={
|
} on-error={
|
||||||
:log warning "Failed imprting certificate!";
|
$LogPrintExit warning ("Failed imprting certificate!") false;
|
||||||
:return false;
|
:return false;
|
||||||
}
|
}
|
||||||
:return true;
|
:return true;
|
||||||
|
|
Loading…
Reference in a new issue