From 8b23c1e925d8512df2d84f6518a33e2e9c56d128 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Tue, 7 Jul 2020 09:05:06 +0200 Subject: check-routeros-update: send just one notification --- check-routeros-update | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/check-routeros-update b/check-routeros-update index 5b5872d..cc44af1 100644 --- a/check-routeros-update +++ b/check-routeros-update @@ -98,6 +98,11 @@ } :if ($NumInstalled > $NumLatest) do={ + :if ($SentRouterosUpdateNotification = $Update->"latest-version") do={ + $LogPrintExit info ("Already sent the RouterOS downgrade notification for version " . \ + $Update->"latest-version" . ".") true; + } + $SendNotification ("RouterOS version") \ ("A different RouterOS version " . ($Update->"latest-version") . \ " is available for " . $Identity . ", but it is a downgrade.\n\n" . \ -- cgit v1.2.3-54-g00ecf