diff options
author | Christian Hesse <mail@eworm.de> | 2019-02-14 20:49:05 +0100 |
---|---|---|
committer | Christian Hesse <mail@eworm.de> | 2019-02-14 20:49:05 +0100 |
commit | 74683b3fc8571a684c6a781e2325253eed4736ae (patch) | |
tree | c8032b395e48fa72ef6cd9415e41e228b16aea40 /capsman-download-packages | |
parent | f127e3b7efe4c7d5dcd828218bbd44cbe04dcb47 (diff) |
capsman-download-packages: split off capsman-rolling-upgrade
Diffstat (limited to 'capsman-download-packages')
-rw-r--r-- | capsman-download-packages | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/capsman-download-packages b/capsman-download-packages index d11dae3..7462699 100644 --- a/capsman-download-packages +++ b/capsman-download-packages @@ -30,13 +30,10 @@ } } -: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"); +:if ($Updated = true) do={ + :if ([ / system script print count-only where name="capsman-rolling-upgrade" ] > 0) do={ + / system script run capsman-rolling-upgrade; + } else={ + / caps-man remote-cap upgrade [ find where version!=$InstalledVersion ]; } } |