From e6c217aa0c9d497a6b6dcf5f49d485127566612d Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Tue, 9 Oct 2018 15:53:27 +0200 Subject: [PATCH] check-routeros-update: use function for notification --- check-routeros-update | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/check-routeros-update b/check-routeros-update index bcc2a2a..fe81489 100644 --- a/check-routeros-update +++ b/check-routeros-update @@ -10,6 +10,8 @@ :global "safe-update-url"; :global "sent-routeros-update-notification"; +:global SendNotification; + :if ([ :len [ / system package find where name="wireless" disabled=no ] ] > 0) do={ :if ([ / interface wireless cap get enabled ] = true && \ [ / caps-man manager get enabled ] = false) do={ @@ -42,9 +44,8 @@ $latestversion . "."); } - / tool e-mail send to=$"email-general-to" cc=$"email-general-cc" \ - subject=("[" . $identity . "] RouterOS update notification") \ - body=("There is a RouterOS update available\n\n" . \ + $SendNotification ("[" . $identity . "] RouterOS update notification") \ + ("There is a RouterOS update available\n\n" . \ "Routerboard: " . $model . "\n" . \ "Serial number: " . $serialnumber . "\n" . \ "Hostname: " . $identity . "\n" . \