mirror of
https://github.com/eworm-de/routeros-scripts.git
synced 2024-05-11 05:55:19 +00:00
check-routeros-update: add version in notification subject
This commit is contained in:
@ -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 });
|
||||
|
Reference in New Issue
Block a user