aboutsummaryrefslogtreecommitdiffstats
path: root/check-routeros-update
diff options
context:
space:
mode:
authorGravatar Christian Hesse <mail@eworm.de>2019-02-19 16:42:04 +0100
committerGravatar Christian Hesse <mail@eworm.de>2019-02-19 16:47:41 +0100
commit5f210eb1ec6f92b86dcbb694b18eff86fe2f9db3 (patch)
treece975200ef78d8177daba1f8f6c52795a9dbbd42 /check-routeros-update
parente991c82016ce0ef54c8c11feccc4348b80240e11 (diff)
check-routeros-update: use new script 'packages-update'
Diffstat (limited to 'check-routeros-update')
-rw-r--r--check-routeros-update9
1 files changed, 5 insertions, 4 deletions
diff --git a/check-routeros-update b/check-routeros-update
index 4a20619..f0b06a1 100644
--- a/check-routeros-update
+++ b/check-routeros-update
@@ -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.";
}
}