1
0
mirror of https://github.com/eworm-de/routeros-scripts.git synced 2024-05-11 05:55:19 +00:00

certificate-renew-issued: log action

This commit is contained in:
Christian Hesse
2020-03-20 08:56:13 +01:00
parent 739884ecc7
commit 1e7e19cc87

View File

@ -6,6 +6,7 @@
:global CertIssuedExportPass;
:global LogPrintExit;
:global MkDir;
:foreach Cert in=[ / certificate find where issued expires-after<3w ] do={
@ -20,5 +21,9 @@
/ certificate export-certificate ($CertVal->"name") type=pkcs12 \
file-name=("cert-issued/" . $CertVal->"common-name") \
export-passphrase=($CertIssuedExportPass->($CertVal->"common-name"));
$LogPrintExit info ("Issued a new certificate for \"" . $CertVal->"common-name" . \
"\", exported to \"cert-issued/" . $CertVal->"common-name" . ".p12\".") false;
} else={
$LogPrintExit info ("Issued a new certificate for \"" . $CertVal->"common-name" . "\".") false;
}
}