diff options
author | Christian Hesse <mail@eworm.de> | 2024-03-06 15:28:55 +0100 |
---|---|---|
committer | Christian Hesse <mail@eworm.de> | 2024-03-12 15:27:15 +0100 |
commit | b1e37c27346209aa523705ee7076a2480e782780 (patch) | |
tree | ccc46d41801616e45c956b26b0a543cf2bb44ad1 | |
parent | 78f65ead599a6ccb9161fe93a88674e28d8e95cb (diff) |
check-certificates: drop main function, use :do with on-error
-rw-r--r-- | check-certificates.rsc | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/check-certificates.rsc b/check-certificates.rsc index e470b59..edde7f3 100644 --- a/check-certificates.rsc +++ b/check-certificates.rsc @@ -11,8 +11,8 @@ :global GlobalFunctionsReady; :while ($GlobalFunctionsReady != true) do={ :delay 500ms; } -:local Main do={ - :local ScriptName [ :tostr $1 ]; +:do { + :local ScriptName [ :jobname ]; :global CertRenewTime; :global CertRenewUrl; @@ -132,7 +132,7 @@ } :if ([ $ScriptLock $ScriptName ] = false) do={ - :return false; + :error false; } $WaitFullyConnected; @@ -216,6 +216,4 @@ ", it is invalid after " . ($CertVal->"invalid-after") . ".") false; } } -} - -$Main [ :jobname ]; +} on-error={ } |