aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Christian Hesse <mail@eworm.de>2018-10-10 12:49:03 +0200
committerGravatar Christian Hesse <mail@eworm.de>2018-10-10 12:49:03 +0200
commitba076db93e9bca8b4412b1ed39d4213db49a8773 (patch)
tree2d9b3a11fa3ceea279c563506837c2c7934a4e5f
parent7aae1bf9dd5714566065ee9958a53be27d73ecc8 (diff)
check-routeros-update: send notification on auto-update
-rw-r--r--check-routeros-update3
1 files changed, 3 insertions, 0 deletions
diff --git a/check-routeros-update b/check-routeros-update
index fe81489..0c39daa 100644
--- a/check-routeros-update
+++ b/check-routeros-update
@@ -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.";
}