update-tunnelbroker: fail if global functions do not become ready

This commit is contained in:
Christian Hesse 2025-05-06 11:15:15 +02:00
parent 87edd0bd29
commit 6040f70b19

View file

@ -11,11 +11,11 @@
# update local address of tunnelbroker interface # update local address of tunnelbroker interface
# https://rsc.eworm.de/doc/update-tunnelbroker.md # https://rsc.eworm.de/doc/update-tunnelbroker.md
:global GlobalFunctionsReady;
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }
:local ExitOK false; :local ExitOK false;
:onerror Err { :onerror Err {
:global GlobalFunctionsReady;
:retry { :if ($GlobalFunctionsReady != true) \
do={ :error ("Global functions not ready."); }; } delay=500ms max=50;
:local ScriptName [ :jobname ]; :local ScriptName [ :jobname ];
:global CertificateAvailable; :global CertificateAvailable;