aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Christian Hesse <mail@eworm.de>2018-10-09 15:53:27 +0200
committerGravatar Christian Hesse <mail@eworm.de>2018-10-09 15:57:53 +0200
commite6c217aa0c9d497a6b6dcf5f49d485127566612d (patch)
treefc6ebad3f299bd7ab6c03c52a9fd1104c728c713
parente89779ff9f11e0a48f3b0cd480c0410d40c1a77e (diff)
check-routeros-update: use function for notification
-rw-r--r--check-routeros-update7
1 files 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" . \