diff options
Diffstat (limited to 'check-perpetual-license.rsc')
-rw-r--r-- | check-perpetual-license.rsc | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/check-perpetual-license.rsc b/check-perpetual-license.rsc index 9a3a3c7..c2f0dff 100644 --- a/check-perpetual-license.rsc +++ b/check-perpetual-license.rsc @@ -8,11 +8,11 @@ # check perpetual license on CHR # https://rsc.eworm.de/doc/check-perpetual-license.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 Identity; @@ -73,6 +73,6 @@ ". It is now valid until " . ($License->"deadline-at") . ".") }); :set SentCertificateNotification; } -} on-error={ - :global ExitError; $ExitError $ExitOK [ :jobname ]; +} do={ + :global ExitError; $ExitError $ExitOK [ :jobname ] $Err; } |