aboutsummaryrefslogtreecommitdiffstats
path: root/check-certificates.rsc
diff options
context:
space:
mode:
Diffstat (limited to 'check-certificates.rsc')
-rw-r--r--check-certificates.rsc12
1 files changed, 6 insertions, 6 deletions
diff --git a/check-certificates.rsc b/check-certificates.rsc
index be8e4df..c10e33b 100644
--- a/check-certificates.rsc
+++ b/check-certificates.rsc
@@ -9,11 +9,11 @@
# check for certificate validity
# https://rsc.eworm.de/doc/check-certificates.md
-:global GlobalFunctionsReady;
-:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }
-
:local ExitOK false;
-:do {
+:onerror Err {
+ :global GlobalConfigReady; :global GlobalFunctionsReady;
+ :retry { :if ($GlobalConfigReady != true || $GlobalFunctionsReady != true) \
+ do={ :error ("Global config and/or functions not ready."); }; } delay=500ms max=50;
:local ScriptName [ :jobname ];
:global CertRenewTime;
@@ -237,6 +237,6 @@
", it is invalid after " . ($CertVal->"invalid-after") . ".");
}
}
-} on-error={
- :global ExitError; $ExitError $ExitOK [ :jobname ];
+} do={
+ :global ExitError; $ExitError $ExitOK [ :jobname ] $Err;
}