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

check-routeros-update: use new script 'packages-update'

This commit is contained in:
Christian Hesse
2019-02-19 16:42:04 +01:00
parent e991c82016
commit 5f210eb1ec

View File

@ -36,14 +36,15 @@
:log warning ("Failed receiving safe version for " . $Channel . ".");
}
: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...");
$SendNotification ("RouterOS update notification") \
("Version " . $LatestVersion . " is considered safe for " . $Channel . \
", 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.";
}
}