From 714a679402ffaa009c74ae5c0d30c2f995e83f57 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Tue, 27 Apr 2021 21:39:30 +0200 Subject: collect-wireless-mac: pass origin to $SendNotification2 --- collect-wireless-mac.capsman | 3 ++- collect-wireless-mac.local | 3 ++- collect-wireless-mac.template | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/collect-wireless-mac.capsman b/collect-wireless-mac.capsman index 92ac9d1..4cf8649 100644 --- a/collect-wireless-mac.capsman +++ b/collect-wireless-mac.capsman @@ -56,7 +56,8 @@ $ScriptLock $0; "first seen on " . $DateTime . " connected to SSID " . $Ssid . ", interface " . $Interface); $LogPrintExit2 info $0 $Message false; / caps-man access-list add place-before=$PlaceBefore comment=$Message mac-address=$Mac disabled=yes; - $SendNotification2 ({ subject=([ $SymbolForNotification "mobile-phone" ] . $Mac . " connected to " . $Ssid); \ + $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" . \ diff --git a/collect-wireless-mac.local b/collect-wireless-mac.local index 828b2eb..a7c26e6 100644 --- a/collect-wireless-mac.local +++ b/collect-wireless-mac.local @@ -56,7 +56,8 @@ $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; - $SendNotification2 ({ subject=([ $SymbolForNotification "mobile-phone" ] . $Mac . " connected to " . $Ssid); \ + $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" . \ diff --git a/collect-wireless-mac.template b/collect-wireless-mac.template index 8e4ab5d..41cf299 100644 --- a/collect-wireless-mac.template +++ b/collect-wireless-mac.template @@ -58,7 +58,8 @@ $ScriptLock $0; "first seen on " . $DateTime . " connected to SSID " . $Ssid . ", interface " . $Interface); $LogPrintExit2 info $0 $Message false; / %PATH% access-list add place-before=$PlaceBefore comment=$Message mac-address=$Mac disabled=yes; - $SendNotification2 ({ subject=([ $SymbolForNotification "mobile-phone" ] . $Mac . " connected to " . $Ssid); \ + $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" . \ -- cgit v1.2.3-54-g00ecf