mirror of
https://git.eworm.de/cgit/routeros-scripts
synced 2025-08-04 02:04:56 +02:00
check-routeros-update: support update from specific neighbor(s)
... by matching the identity property.
This commit is contained in:
parent
49d85c6def
commit
7b47ed7ea5
5 changed files with 8 additions and 2 deletions
|
@ -13,6 +13,7 @@
|
|||
:global Identity;
|
||||
:global SafeUpdateAll;
|
||||
:global SafeUpdateNeighbor;
|
||||
:global SafeUpdateNeighborIdentity;
|
||||
:global SafeUpdatePatch;
|
||||
:global SafeUpdateUrl;
|
||||
:global SentRouterosUpdateNotification;
|
||||
|
@ -81,7 +82,8 @@ $LogPrintExit2 debug $0 ("Checking for updates...") false;
|
|||
}
|
||||
|
||||
:if ($SafeUpdateNeighbor = true && [ :len [ /ip/neighbor/find where platform="MikroTik" \
|
||||
version~("^" . [ $EscapeForRegEx ($Update->"latest-version" . " (" . $Update->"channel" . ")") ]) ] ] > 0) do={
|
||||
version~("^" . [ $EscapeForRegEx ($Update->"latest-version" . " (" . $Update->"channel" . ")") ]) \
|
||||
identity~$SafeUpdateNeighborIdentity ] ] > 0) do={
|
||||
$LogPrintExit2 info $0 ("Seen a neighbor running version " . $Update->"latest-version" . ", updating...") false;
|
||||
$SendNotification2 ({ origin=$0; \
|
||||
subject=([ $SymbolForNotification "sparkles" ] . "RouterOS update: " . $Update->"latest-version"); \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue