From 2a80fd6dbe64363123086cb9e7c16f84d9d71569 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Mon, 24 Feb 2020 11:12:45 +0100 Subject: check-certificates: check for synced time --- check-certificates | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'check-certificates') 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 ]; -- cgit v1.2.3-54-g00ecf