aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Christian Hesse <mail@eworm.de>2020-03-05 09:08:57 +0100
committerGravatar Christian Hesse <mail@eworm.de>2020-03-05 09:08:57 +0100
commit970641a9740fbe8e42acff44fcfdefaadaf35f24 (patch)
tree349e4acc16cda2f6c73431f520da8985a25c7135
parent08bb73b6fce071ed9da6803f56ba54ee1cdd51c4 (diff)
check-routeros-update: use $LogPrintExit
-rw-r--r--check-routeros-update9
1 files 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") \