mirror of
https://github.com/eworm-de/routeros-scripts.git
synced 2025-08-04 18:24:35 +02:00
capsman-rolling-upgrade: drop main function, use :do with on-error
This commit is contained in:
parent
03309d4fdb
commit
25c9bff6f3
3 changed files with 12 additions and 18 deletions
|
@ -15,14 +15,14 @@
|
|||
:global GlobalFunctionsReady;
|
||||
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }
|
||||
|
||||
:local Main do={
|
||||
:local ScriptName [ :tostr $1 ];
|
||||
:do {
|
||||
:local ScriptName [ :jobname ];
|
||||
|
||||
:global LogPrintExit2;
|
||||
:global ScriptLock;
|
||||
|
||||
:if ([ $ScriptLock $ScriptName ] = false) do={
|
||||
:return false;
|
||||
:error false;
|
||||
}
|
||||
|
||||
:local InstalledVersion [ /system/package/update/get installed-version ];
|
||||
|
@ -44,6 +44,4 @@
|
|||
:delay ($Delay . "s");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$Main [ :jobname ];
|
||||
} on-error={ }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue