mirror of
https://git.eworm.de/cgit/routeros-scripts
synced 2025-07-09 17:44:29 +02:00
check-certificates: check for synced time
This commit is contained in:
parent
6e8f5f19f6
commit
2a80fd6dbe
1 changed files with 6 additions and 0 deletions
|
@ -11,6 +11,7 @@
|
||||||
:global CertificateNameByCN;
|
:global CertificateNameByCN;
|
||||||
:global ParseKeyValueStore;
|
:global ParseKeyValueStore;
|
||||||
:global SendNotification;
|
:global SendNotification;
|
||||||
|
:global TimeIsSync;
|
||||||
:global UrlEncode;
|
:global UrlEncode;
|
||||||
:global WaitForFile;
|
:global WaitForFile;
|
||||||
|
|
||||||
|
@ -19,6 +20,11 @@
|
||||||
:return [ $CharacterReplace [ $CharacterReplace [ :tostr $1 ] "w" "w " ] "d" "d " ];
|
: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={
|
:foreach Cert in=[ / certificate find where !revoked !ca expires-after<3w ] do={
|
||||||
:local CertVal [ / certificate get $Cert ];
|
:local CertVal [ / certificate get $Cert ];
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue