aboutsummaryrefslogtreecommitdiffstats
path: root/capsman-rolling-upgrade.wifi.rsc
diff options
context:
space:
mode:
Diffstat (limited to 'capsman-rolling-upgrade.wifi.rsc')
-rw-r--r--capsman-rolling-upgrade.wifi.rsc22
1 files changed, 13 insertions, 9 deletions
diff --git a/capsman-rolling-upgrade.wifi.rsc b/capsman-rolling-upgrade.wifi.rsc
index 369dccc..8e32ab2 100644
--- a/capsman-rolling-upgrade.wifi.rsc
+++ b/capsman-rolling-upgrade.wifi.rsc
@@ -1,27 +1,29 @@
#!rsc by RouterOS
# RouterOS script: capsman-rolling-upgrade.wifi
-# Copyright (c) 2018-2024 Christian Hesse <mail@eworm.de>
+# Copyright (c) 2018-2025 Christian Hesse <mail@eworm.de>
# Michael Gisbers <michael@gisbers.de>
-# https://git.eworm.de/cgit/routeros-scripts/about/COPYING.md
+# https://rsc.eworm.de/COPYING.md
#
# provides: capsman-rolling-upgrade.wifi
-# requires RouterOS, version=7.14
+# requires RouterOS, version=7.15
#
# upgrade CAPs one after another
-# https://git.eworm.de/cgit/routeros-scripts/about/doc/capsman-rolling-upgrade.md
+# https://rsc.eworm.de/doc/capsman-rolling-upgrade.md
#
# !! Do not edit this file, it is generated from template!
-:global GlobalFunctionsReady;
-:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }
-
-:do {
+:local ExitOK false;
+:onerror Err {
+ :global GlobalConfigReady; :global GlobalFunctionsReady;
+ :retry { :if ($GlobalConfigReady != true || $GlobalFunctionsReady != true) \
+ do={ :error ("Global config and/or functions not ready."); }; } delay=500ms max=50;
:local ScriptName [ :jobname ];
:global LogPrint;
:global ScriptLock;
:if ([ $ScriptLock $ScriptName ] = false) do={
+ :set ExitOK true;
:error false;
}
@@ -44,4 +46,6 @@
:delay ($Delay . "s");
}
}
-} on-error={ }
+} do={
+ :global ExitError; $ExitError $ExitOK [ :jobname ] $Err;
+}