From 5f210eb1ec6f92b86dcbb694b18eff86fe2f9db3 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Tue, 19 Feb 2019 16:42:04 +0100 Subject: check-routeros-update: use new script 'packages-update' --- check-routeros-update | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'check-routeros-update') 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."; } } -- cgit v1.2.3-54-g00ecf