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 CertificateNameByCN;
|
||||
:global LogPrintExit;
|
||||
:global UrlEncode;
|
||||
:global WaitForFile;
|
||||
|
||||
:log info ("Downloading and importing certificate with " . \
|
||||
"CommonName \"" . $CommonName . "\".");
|
||||
$LogPrintExit info ("Downloading and importing certificate with " . \
|
||||
"CommonName \"" . $CommonName . "\".") false;
|
||||
:do {
|
||||
:local LocalFileName ($CommonName . ".pem");
|
||||
:local UrlFileName ([ $UrlEncode $CommonName ] . ".pem");
|
||||
|
@ -108,7 +109,7 @@
|
|||
$CertificateNameByCN [ / certificate get $Cert common-name ];
|
||||
}
|
||||
} on-error={
|
||||
:log warning "Failed imprting certificate!";
|
||||
$LogPrintExit warning ("Failed imprting certificate!") false;
|
||||
:return false;
|
||||
}
|
||||
:return true;
|
||||
|
|
Loading…
Reference in a new issue