From 970641a9740fbe8e42acff44fcfdefaadaf35f24 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Thu, 5 Mar 2020 09:08:57 +0100 Subject: check-routeros-update: use $LogPrintExit --- check-routeros-update | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/check-routeros-update b/check-routeros-update index 4ed52f3..6672f13 100644 --- a/check-routeros-update +++ b/check-routeros-update @@ -48,10 +48,10 @@ ($SafeUpdateUrl . $Update->"channel" . "?installed=" . $Update->"installed-version" . \ "&latest=" . $Update->"latest-version") output=user as-value ]; } on-error={ - :log warning ("Failed receiving safe version for " . $Update->"channel" . "."); + $LogPrintExit warning ("Failed receiving safe version for " . $Update->"channel" . ".") false; } :if ($Result->"status" = "finished" && $Result->"data" = $Update->"latest-version") do={ - :log info ("Version " . $Update->"latest-version" . " is considered safe, updating..."); + $LogPrintExit info ("Version " . $Update->"latest-version" . " is considered safe, updating...") false; $SendNotification ("RouterOS update") \ ("Version " . $Update->"latest-version" . " is considered safe for " . $Update->"channel" . \ ", updating on " . $Identity . "...") "" "true"; @@ -69,9 +69,8 @@ } :if ($SentRouterosUpdateNotification = $Update->"latest-version") do={ - :log info ("Already sent the RouterOS update notification for version " . \ - $Update->"latest-version" . "."); - :error "Already sent notification."; + $LogPrintExit info ("Already sent the RouterOS update notification for version " . \ + $Update->"latest-version" . ".") true; } $SendNotification ("RouterOS update") \ -- cgit v1.2.3-54-g00ecf