aboutsummaryrefslogtreecommitdiffstats
path: root/collect-wireless-mac.capsman
diff options
context:
space:
mode:
authorGravatar Christian Hesse <mail@eworm.de>2018-10-09 15:50:37 +0200
committerGravatar Christian Hesse <mail@eworm.de>2018-10-09 15:57:53 +0200
commitf262ff99a83d1c588b9eb275e9b17bb076ab3c8b (patch)
tree35d2f927aade4c523c984e366ceff14ec81e254a /collect-wireless-mac.capsman
parent9d53c82d1cdd666d51de2957360125b7c9450575 (diff)
collect-wireless-mac: use function for notification
Diffstat (limited to 'collect-wireless-mac.capsman')
-rw-r--r--collect-wireless-mac.capsman7
1 files changed, 4 insertions, 3 deletions
diff --git a/collect-wireless-mac.capsman b/collect-wireless-mac.capsman
index de2fdb8..d60710f 100644
--- a/collect-wireless-mac.capsman
+++ b/collect-wireless-mac.capsman
@@ -10,6 +10,8 @@
:global "email-general-to";
:global "email-general-cc";
+:global SendNotification;
+
:local "place-before" [ / caps-man access-list find where comment="--- collected above ---" disabled ];
:if ([ :len $"place-before" ] = 0) do={
:error "Missing disabled access-list entry with comment '--- collected above ---'";
@@ -40,9 +42,8 @@
$datetime . " connected to SSID " . $ssid . ", interface " . $interface);
/ log info $message;
/ caps-man access-list add place-before=$"place-before" comment=$message mac-address=$mac disabled=yes;
- / tool e-mail send to=$"email-general-to" cc=$"email-general-cc" \
- subject=("[" . $identity . "] " . $mac . " connected to " . $ssid) \
- body=("A device with unknown MAC address connected to " . $ssid . " on " . $identity . ".\n\n" . \
+ $SendNotification ("[" . $identity . "] " . $mac . " connected to " . $ssid) \
+ ("A device with unknown MAC address connected to " . $ssid . " on " . $identity . ".\n\n" . \
"Controller: " . $identity . "\n" . \
"Interface: " . $interface . "\n" . \
"SSID: " . $ssid . "\n" . \