diff options
author | Christian Hesse <mail@eworm.de> | 2023-08-17 09:06:44 +0200 |
---|---|---|
committer | Christian Hesse <mail@eworm.de> | 2023-08-31 09:40:09 +0200 |
commit | 7b47ed7ea5a937edef9699c1b8be3b6364c9c0c9 (patch) | |
tree | e475aae09e3c6f8e748c27e5614bf4b91fe64c1e /check-routeros-update.rsc | |
parent | 49d85c6def6426a64b2ae516af80609cd17af317 (diff) |
check-routeros-update: support update from specific neighbor(s)change-105
... by matching the identity property.
Diffstat (limited to 'check-routeros-update.rsc')
-rw-r--r-- | check-routeros-update.rsc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/check-routeros-update.rsc b/check-routeros-update.rsc index b328d4c..0625ebd 100644 --- a/check-routeros-update.rsc +++ b/check-routeros-update.rsc @@ -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"); \ |