mirror of
https://github.com/nymurbd/MikroTik-scripts.git
synced 2025-07-13 19:44:30 +02:00
capsman-download-packages: upgrade CAPs one after another with delay
This commit is contained in:
parent
b3459ed47c
commit
4c61849483
1 changed files with 9 additions and 2 deletions
|
@ -32,6 +32,13 @@
|
|||
}
|
||||
}
|
||||
|
||||
:if ($Updated = true) do={
|
||||
/ caps-man remote-cap upgrade [ find where version!=$InstalledVersion ];
|
||||
:local RemoteCapCount [ /caps-man remote-cap print count-only ];
|
||||
:if ($Updated = true && $RemoteCapCount > 0) do={
|
||||
:local Delay (600 / $RemoteCapCount);
|
||||
:if ($Delay > 120) do={ :set Delay 120; }
|
||||
:foreach RemoteCap in=[ / caps-man remote-cap find where version!=$InstalledVersion ] do={
|
||||
:log debug ("Starting upgrade for CAP " . [ / caps-man remote-cap get $RemoteCap name ] . "...");
|
||||
/ caps-man remote-cap upgrade $RemoteCap;
|
||||
:delay ($Delay . "s");
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue