aboutsummaryrefslogtreecommitdiffstats
path: root/certificate-renew-issued.rsc
diff options
context:
space:
mode:
Diffstat (limited to 'certificate-renew-issued.rsc')
-rw-r--r--certificate-renew-issued.rsc12
1 files changed, 6 insertions, 6 deletions
diff --git a/certificate-renew-issued.rsc b/certificate-renew-issued.rsc
index 91a48de..14917e4 100644
--- a/certificate-renew-issued.rsc
+++ b/certificate-renew-issued.rsc
@@ -8,11 +8,11 @@
# renew locally issued certificates
# https://rsc.eworm.de/doc/certificate-renew-issued.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 CertIssuedExportPass;
@@ -47,6 +47,6 @@
$LogPrint info $ScriptName ("Issued a new certificate for '" . $CertVal->"common-name" . "'.");
}
}
-} on-error={
- :global ExitError; $ExitError $ExitOK [ :jobname ];
+} do={
+ :global ExitError; $ExitError $ExitOK [ :jobname ] $Err;
}