update-tunnelbroker: drop main function, use :do with on-error

This commit is contained in:
Christian Hesse 2024-03-06 15:28:55 +01:00
parent febd13af13
commit f0856c264e

View file

@ -13,8 +13,8 @@
:global GlobalFunctionsReady; :global GlobalFunctionsReady;
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; } :while ($GlobalFunctionsReady != true) do={ :delay 500ms; }
:local Main do={ :do {
:local ScriptName [ :tostr $1 ]; :local ScriptName [ :jobname ];
:global CertificateAvailable; :global CertificateAvailable;
:global LogPrintExit2; :global LogPrintExit2;
@ -22,7 +22,7 @@
:global ScriptLock; :global ScriptLock;
:if ([ $ScriptLock $ScriptName ] = false) do={ :if ([ $ScriptLock $ScriptName ] = false) do={
:return false; :error false;
} }
:if ([ $CertificateAvailable "Starfield Secure Certificate Authority - G2" ] = false) do={ :if ([ $CertificateAvailable "Starfield Secure Certificate Authority - G2" ] = false) do={
@ -62,6 +62,4 @@
/interface/6to4/set $Interface local-address=$PublicAddress; /interface/6to4/set $Interface local-address=$PublicAddress;
} }
} }
} } on-error={ }
$Main [ :jobname ];