check-routeros-update: send notification on auto-update

This commit is contained in:
Christian Hesse 2018-10-10 12:49:03 +02:00
parent 7aae1bf9dd
commit ba076db93e

View file

@ -34,6 +34,9 @@
"&latest=" . $latestversion) output=user as-value ];
:if ($result->"status" = "finished" && $result->"data" = $latestversion) do={
:log info ("Version " . $latestversion . " is assumed safe, updating...");
$SendNotification ("[" . $identity . "] RouterOS update notification") \
("Version " . $latestversion . " is assumed safe for " . $channel . \
", updating on " . $identity . "...");
/ system package update install;
:error "Waiting for system to reboot.";
}