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

check-certificates: check for synced time

This commit is contained in:
Christian Hesse
2020-02-24 11:12:45 +01:00
parent 6e8f5f19f6
commit 2a80fd6dbe

View File

@ -11,6 +11,7 @@
:global CertificateNameByCN;
:global ParseKeyValueStore;
:global SendNotification;
:global TimeIsSync;
:global UrlEncode;
:global WaitForFile;
@ -19,6 +20,11 @@
:return [ $CharacterReplace [ $CharacterReplace [ :tostr $1 ] "w" "w " ] "d" "d " ];
}
:if ($TimeIsSync = false) do={
:log warning "Time is not yet synchronized.";
:error "Warning: See log for details.";
}
:foreach Cert in=[ / certificate find where !revoked !ca expires-after<3w ] do={
:local CertVal [ / certificate get $Cert ];