aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Christian Hesse <mail@eworm.de>2024-03-06 15:28:55 +0100
committerGravatar Christian Hesse <mail@eworm.de>2024-03-12 15:27:15 +0100
commitf0856c264e07804a229668268a457f2154cb373a (patch)
tree7ced2fbdb536447b537a967e945600ba6dd78c8a
parentfebd13af13c3bd0fff3d702364a3979d3e4221a3 (diff)
update-tunnelbroker: drop main function, use :do with on-error
-rw-r--r--update-tunnelbroker.rsc10
1 files changed, 4 insertions, 6 deletions
diff --git a/update-tunnelbroker.rsc b/update-tunnelbroker.rsc
index 90e3f24..9f316e3 100644
--- a/update-tunnelbroker.rsc
+++ b/update-tunnelbroker.rsc
@@ -13,8 +13,8 @@
:global GlobalFunctionsReady;
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }
-:local Main do={
- :local ScriptName [ :tostr $1 ];
+:do {
+ :local ScriptName [ :jobname ];
:global CertificateAvailable;
:global LogPrintExit2;
@@ -22,7 +22,7 @@
:global ScriptLock;
:if ([ $ScriptLock $ScriptName ] = false) do={
- :return false;
+ :error false;
}
:if ([ $CertificateAvailable "Starfield Secure Certificate Authority - G2" ] = false) do={
@@ -62,6 +62,4 @@
/interface/6to4/set $Interface local-address=$PublicAddress;
}
}
-}
-
-$Main [ :jobname ];
+} on-error={ }