From be0bbe80d942c16200022c13538f1d0147211552 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Wed, 19 Apr 2023 22:02:27 +0200 Subject: [PATCH] check-routeros-update: add version in notification subject --- check-routeros-update.rsc | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/check-routeros-update.rsc b/check-routeros-update.rsc index d1c82c5..4c1aaf9 100644 --- a/check-routeros-update.rsc +++ b/check-routeros-update.rsc @@ -64,7 +64,7 @@ $LogPrintExit2 debug $0 ("Checking for updates...") false; $LogPrintExit2 info $0 ("Installing ALL versions automatically, including " . \ $Update->"latest-version" . "...") false; $SendNotification2 ({ origin=$0; \ - subject=([ $SymbolForNotification "sparkles" ] . "RouterOS update"); \ + subject=([ $SymbolForNotification "sparkles" ] . "RouterOS update: " . $Update->"latest-version"); \ message=("Installing ALL versions automatically, including " . $Update->"latest-version" . \ "... Updating on " . $Identity . "..."); link=$Link; silent=true }); $DoUpdate; @@ -73,7 +73,7 @@ $LogPrintExit2 debug $0 ("Checking for updates...") false; :if ($SafeUpdatePatch = true && ($NumInstalled & 0xffff0000) = ($NumLatest & 0xffff0000)) do={ $LogPrintExit2 info $0 ("Version " . $Update->"latest-version" . " is a patch release, updating...") false; $SendNotification2 ({ origin=$0; \ - subject=([ $SymbolForNotification "sparkles" ] . "RouterOS update"); \ + subject=([ $SymbolForNotification "sparkles" ] . "RouterOS update: " . $Update->"latest-version"); \ message=("Version " . $Update->"latest-version" . " is a patch update for " . $Update->"channel" . \ ", updating on " . $Identity . "..."); link=$Link; silent=true }); $DoUpdate; @@ -83,7 +83,7 @@ $LogPrintExit2 debug $0 ("Checking for updates...") false; version=($Update->"latest-version" . " (" . $Update->"channel" . ")") ] ] > 0) do={ $LogPrintExit2 info $0 ("Seen a neighbor running version " . $Update->"latest-version" . ", updating...") false; $SendNotification2 ({ origin=$0; \ - subject=([ $SymbolForNotification "sparkles" ] . "RouterOS update"); \ + subject=([ $SymbolForNotification "sparkles" ] . "RouterOS update: " . $Update->"latest-version"); \ message=("Seen a neighbor running version " . $Update->"latest-version" . " from " . $Update->"channel" . \ ", updating on " . $Identity . "..."); link=$Link; silent=true }); $DoUpdate; @@ -101,7 +101,7 @@ $LogPrintExit2 debug $0 ("Checking for updates...") false; :if ($Result->"status" = "finished" && $Result->"data" = $Update->"latest-version") do={ $LogPrintExit2 info $0 ("Version " . $Update->"latest-version" . " is considered safe, updating...") false; $SendNotification2 ({ origin=$0; \ - subject=([ $SymbolForNotification "sparkles" ] . "RouterOS update"); \ + subject=([ $SymbolForNotification "sparkles" ] . "RouterOS update: " . $Update->"latest-version"); \ message=("Version " . $Update->"latest-version" . " is considered safe for " . $Update->"channel" . \ ", updating on " . $Identity . "..."); link=$Link; silent=true }); $DoUpdate; @@ -123,7 +123,7 @@ $LogPrintExit2 debug $0 ("Checking for updates...") false; } $SendNotification2 ({ origin=$0; \ - subject=([ $SymbolForNotification "sparkles" ] . "RouterOS update"); \ + subject=([ $SymbolForNotification "sparkles" ] . "RouterOS update: " . $Update->"latest-version"); \ message=("A new RouterOS version " . ($Update->"latest-version") . \ " is available for " . $Identity . ".\n\n" . \ [ $DeviceInfo ]); link=$Link; silent=true }); @@ -137,7 +137,7 @@ $LogPrintExit2 debug $0 ("Checking for updates...") false; } $SendNotification2 ({ origin=$0; \ - subject=([ $SymbolForNotification "warning-sign" ] . "RouterOS version"); \ + subject=([ $SymbolForNotification "warning-sign" ] . "RouterOS version: " . $Update->"latest-version"); \ message=("A different RouterOS version " . ($Update->"latest-version") . \ " is available for " . $Identity . ", but it is a downgrade.\n\n" . \ [ $DeviceInfo ]); link=$Link; silent=true });