aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Christian Hesse <mail@eworm.de>2018-10-09 15:47:29 +0200
committerGravatar Christian Hesse <mail@eworm.de>2018-10-09 15:47:29 +0200
commit9d53c82d1cdd666d51de2957360125b7c9450575 (patch)
tree253156ebfc4c67e23b22921cc68c5e59c55237e7
parent5e4ef0ab8fe45790acca764f81055ae83b9524fd (diff)
email-daily-psk: use function for notification
-rw-r--r--email-daily-psk9
1 files changed, 5 insertions, 4 deletions
diff --git a/email-daily-psk b/email-daily-psk
index e8e92bd..4b26608 100644
--- a/email-daily-psk
+++ b/email-daily-psk
@@ -9,6 +9,8 @@
:global "email-general-cc";
:global "daily-psk-match-comment";
+:global SendNotification;
+
:local seen [ :toarray "" ];
:foreach acclist in=[ / interface wireless access-list find where comment~$"daily-psk-match-comment" ] do={
@@ -45,13 +47,12 @@
/ tool fetch mode=https check-certificate=yes-without-crl address=$host host=$host \
src-path=$srcpath dst-path=qrcode-daily.png;
- / tool e-mail send to=$"email-general-to" cc=$"email-general-cc" \
- subject=("[" . $identity . "] daily PSK " . $ssid) \
- body=("This is the daily PSK on " . $identity . ":\n\n" . \
+ $SendNotification ("[" . $identity . "] daily PSK " . $ssid) \
+ ("This is the daily PSK on " . $identity . ":\n\n" . \
"SSID: " . $ssid . "\n" . \
"PSK: " . $psk . "\n" . \
"Date: " . [ / system clock get date ] . "\n\n" . \
"https://" . $host . $srcpath) \
- file=qrcode-daily.png;
+ "qrcode-daily.png";
}
}