From 446aa3d7ffff5f9b70be2bfafdcef2ec88f3742c Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Tue, 6 May 2025 11:15:15 +0200 Subject: [PATCH] netwatch-notify: fail if global functions do not become ready --- netwatch-notify.rsc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/netwatch-notify.rsc b/netwatch-notify.rsc index d256689..0c48330 100644 --- a/netwatch-notify.rsc +++ b/netwatch-notify.rsc @@ -8,11 +8,11 @@ # monitor netwatch and send notifications # https://rsc.eworm.de/doc/netwatch-notify.md -:global GlobalFunctionsReady; -:while ($GlobalFunctionsReady != true) do={ :delay 500ms; } - :local ExitOK false; :onerror Err { + :global GlobalFunctionsReady; + :retry { :if ($GlobalFunctionsReady != true) \ + do={ :error ("Global functions not ready."); }; } delay=500ms max=50; :local ScriptName [ :jobname ]; :global NetwatchNotify;