1
0
mirror of https://github.com/eworm-de/routeros-scripts.git synced 2024-05-11 05:55:19 +00:00

capsman-download-packages: find script by code comment

This commit is contained in:
Christian Hesse
2023-08-07 13:02:58 +02:00
parent 0f787f9b03
commit 5ea74968d9
2 changed files with 5 additions and 2 deletions

@ -78,8 +78,9 @@ $WaitFullyConnected;
}
:if ($Updated = true) do={
:if ([ :len [ /system/script/find where name="capsman-rolling-upgrade" ] ] > 0) do={
/system/script/run capsman-rolling-upgrade;
:local Script ([ /system/script/find where source~"\n# provides: capsman-rolling-upgrade\n" ]->0);
:if ([ :len $Script ] > 0) do={
/system/script/run $Script;
} else={
/caps-man/remote-cap/upgrade [ find where version!=$InstalledVersion ];
}

@ -4,6 +4,8 @@
# Michael Gisbers <michael@gisbers.de>
# https://git.eworm.de/cgit/routeros-scripts/about/COPYING.md
#
# provides: capsman-rolling-upgrade
#
# upgrade CAPs one after another
# https://git.eworm.de/cgit/routeros-scripts/about/doc/capsman-rolling-upgrade.md