aboutsummaryrefslogtreecommitdiffstats
path: root/collect-wireless-mac.local
diff options
context:
space:
mode:
authorGravatar Christian Hesse <mail@eworm.de>2021-04-28 20:16:08 +0200
committerGravatar Christian Hesse <mail@eworm.de>2021-04-28 20:16:08 +0200
commitda877612209b217fdfd5429889b6d7284bfd10a5 (patch)
tree17fae6776664e6c550c3ba3b2ea7025779b9c35e /collect-wireless-mac.local
parentd4c9d1c577d14991a63f285e57fcf2cfaa2d5cd4 (diff)
parent56b75237754eb065aecb932b3082ba0ca29c3f7c (diff)
Merge branch 'notifications' into next
Diffstat (limited to 'collect-wireless-mac.local')
-rw-r--r--collect-wireless-mac.local9
1 files changed, 5 insertions, 4 deletions
diff --git a/collect-wireless-mac.local b/collect-wireless-mac.local
index 7489c4c..a7c26e6 100644
--- a/collect-wireless-mac.local
+++ b/collect-wireless-mac.local
@@ -17,7 +17,7 @@
:global GetMacVendor;
:global LogPrintExit2;
:global ScriptLock;
-:global SendNotification;
+:global SendNotification2;
:global SymbolForNotification;
$ScriptLock $0;
@@ -56,8 +56,9 @@ $ScriptLock $0;
"first seen on " . $DateTime . " connected to SSID " . $Ssid . ", interface " . $Interface);
$LogPrintExit2 info $0 $Message false;
/ interface wireless access-list add place-before=$PlaceBefore comment=$Message mac-address=$Mac disabled=yes;
- $SendNotification ([ $SymbolForNotification "mobile-phone" ] . $Mac . " connected to " . $Ssid) \
- ("A device with unknown MAC address connected to " . $Ssid . " on " . $Identity . ".\n\n" . \
+ $SendNotification2 ({ origin=$0; \
+ subject=([ $SymbolForNotification "mobile-phone" ] . $Mac . " connected to " . $Ssid); \
+ message=("A device with unknown MAC address connected to " . $Ssid . " on " . $Identity . ".\n\n" . \
"Controller: " . $Identity . "\n" . \
"Interface: " . $Interface . "\n" . \
"SSID: " . $Ssid . "\n" . \
@@ -66,7 +67,7 @@ $ScriptLock $0;
"Hostname: " . $HostName . "\n" . \
"Address: " . $Address . "\n" . \
"DNS name: " . $DnsName . "\n" . \
- "Date: " . $DateTime);
+ "Date: " . $DateTime) });
} else={
$LogPrintExit2 debug $0 ("MAC address " . $Mac . " already known: " . \
[ / interface wireless access-list get $AccessList comment ]) false;