aboutsummaryrefslogtreecommitdiffstats
path: root/fw-addr-lists.rsc
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
commitc1362f54e585d2b17fac9232cbf845da34fa8707 (patch)
treeebda421a1d2092948bf6dbd31967a72968b4e178 /fw-addr-lists.rsc
parent894c36fc1583bbc6b48ecaa35c562dfcf467e4d3 (diff)
fw-addr-lists: drop main function, use :do with on-error
Diffstat (limited to 'fw-addr-lists.rsc')
-rw-r--r--fw-addr-lists.rsc10
1 files changed, 4 insertions, 6 deletions
diff --git a/fw-addr-lists.rsc b/fw-addr-lists.rsc
index 8ba0147..6071f7b 100644
--- a/fw-addr-lists.rsc
+++ b/fw-addr-lists.rsc
@@ -11,8 +11,8 @@
:global GlobalFunctionsReady;
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }
-:local Main do={
- :local ScriptName [ :tostr $1 ];
+:do {
+ :local ScriptName [ :jobname ];
:global FetchUserAgent;
:global FwAddrLists;
@@ -35,7 +35,7 @@
}
:if ([ $ScriptLock $ScriptName ] = false) do={
- :return false;
+ :error false;
}
$WaitFullyConnected;
@@ -156,6 +156,4 @@
$LogPrintExit2 info $ScriptName ("list: " . $FwListName . " -- added: " . $CntAdd . " - renewed: " . $CntRenew . " - removed: " . $CntRemove) false;
}
-}
-
-$Main [ :jobname ];
+} on-error={ }