aboutsummaryrefslogtreecommitdiffstats
path: root/check-certificates
diff options
context:
space:
mode:
authorGravatar Christian Hesse <mail@eworm.de>2020-02-24 11:12:45 +0100
committerGravatar Christian Hesse <mail@eworm.de>2020-02-24 11:14:49 +0100
commit2a80fd6dbe64363123086cb9e7c16f84d9d71569 (patch)
treec38b14d146029a50e03ef818347c610a602db356 /check-certificates
parent6e8f5f19f60ec3b82a63a19bad39793c8abe09fa (diff)
check-certificates: check for synced time
Diffstat (limited to 'check-certificates')
-rw-r--r--check-certificates6
1 files changed, 6 insertions, 0 deletions
diff --git a/check-certificates b/check-certificates
index e13e984..b0c2c60 100644
--- a/check-certificates
+++ b/check-certificates
@@ -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 ];