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:
@ -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.";
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user