mirror of
https://git.eworm.de/cgit/routeros-scripts
synced 2025-06-29 04:40:07 +02:00
check-routeros-update: use new script 'packages-update'
This commit is contained in:
parent
e991c82016
commit
5f210eb1ec
1 changed files with 5 additions and 4 deletions
|
@ -36,14 +36,15 @@
|
||||||
:log warning ("Failed receiving safe version for " . $Channel . ".");
|
:log warning ("Failed receiving safe version for " . $Channel . ".");
|
||||||
}
|
}
|
||||||
:if ($Result->"status" = "finished" && $Result->"data" = $LatestVersion) do={
|
:if ($Result->"status" = "finished" && $Result->"data" = $LatestVersion) do={
|
||||||
:if ([ / system script print count-only where name="email-backup" ] > 0) do={
|
|
||||||
/ system script run email-backup;
|
|
||||||
}
|
|
||||||
:log info ("Version " . $LatestVersion . " is considered safe, updating...");
|
:log info ("Version " . $LatestVersion . " is considered safe, updating...");
|
||||||
$SendNotification ("RouterOS update notification") \
|
$SendNotification ("RouterOS update notification") \
|
||||||
("Version " . $LatestVersion . " is considered safe for " . $Channel . \
|
("Version " . $LatestVersion . " is considered safe for " . $Channel . \
|
||||||
", updating on " . $Identity . "...");
|
", updating on " . $Identity . "...");
|
||||||
/ system package update install without-paging;
|
:if ([ / system script print count-only where name="packages-update" ] > 0) do={
|
||||||
|
/ system script run packages-update;
|
||||||
|
} else={
|
||||||
|
/ system package update install without-paging;
|
||||||
|
}
|
||||||
:error "Waiting for system to reboot.";
|
:error "Waiting for system to reboot.";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue