global-functions: $CertificateDownload: use $LogPrintExit

This commit is contained in:
Christian Hesse 2020-04-03 16:45:28 +02:00
parent 7cdeb9185e
commit 596fb5f835

View file

@ -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;