diff options
author | Christian Hesse <mail@eworm.de> | 2023-04-19 22:02:27 +0200 |
---|---|---|
committer | Christian Hesse <mail@eworm.de> | 2023-04-19 22:05:43 +0200 |
commit | be0bbe80d942c16200022c13538f1d0147211552 (patch) | |
tree | 27e474cdc1b21e926a564ae81966ee09829662cd /check-routeros-update.rsc | |
parent | baf6b3ae178453975940d5002030b4df9e157e01 (diff) |
check-routeros-update: add version in notification subject
Diffstat (limited to 'check-routeros-update.rsc')
-rw-r--r-- | check-routeros-update.rsc | 12 |
1 files 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 }); |