From 1ca3e8b59fbd4374ba9d94d83944411ef0d81ae2 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Tue, 27 Apr 2021 20:33:05 +0200 Subject: collect-wireless-mac: use $SendNotification2 --- collect-wireless-mac.capsman | 8 ++++---- collect-wireless-mac.local | 8 ++++---- collect-wireless-mac.template | 8 ++++---- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/collect-wireless-mac.capsman b/collect-wireless-mac.capsman index ca43dc5..92ac9d1 100644 --- a/collect-wireless-mac.capsman +++ b/collect-wireless-mac.capsman @@ -17,7 +17,7 @@ :global GetMacVendor; :global LogPrintExit2; :global ScriptLock; -:global SendNotification; +:global SendNotification2; :global SymbolForNotification; $ScriptLock $0; @@ -56,8 +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; - $SendNotification ([ $SymbolForNotification "mobile-phone" ] . $Mac . " connected to " . $Ssid) \ - ("A device with unknown MAC address connected to " . $Ssid . " on " . $Identity . ".\n\n" . \ + $SendNotification2 ({ 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 +66,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: " . \ [ / caps-man access-list get $AccessList comment ]) false; diff --git a/collect-wireless-mac.local b/collect-wireless-mac.local index 7489c4c..828b2eb 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,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; - $SendNotification ([ $SymbolForNotification "mobile-phone" ] . $Mac . " connected to " . $Ssid) \ - ("A device with unknown MAC address connected to " . $Ssid . " on " . $Identity . ".\n\n" . \ + $SendNotification2 ({ 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 +66,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; diff --git a/collect-wireless-mac.template b/collect-wireless-mac.template index b6c4efa..8e4ab5d 100644 --- a/collect-wireless-mac.template +++ b/collect-wireless-mac.template @@ -18,7 +18,7 @@ :global GetMacVendor; :global LogPrintExit2; :global ScriptLock; -:global SendNotification; +:global SendNotification2; :global SymbolForNotification; $ScriptLock $0; @@ -58,8 +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; - $SendNotification ([ $SymbolForNotification "mobile-phone" ] . $Mac . " connected to " . $Ssid) \ - ("A device with unknown MAC address connected to " . $Ssid . " on " . $Identity . ".\n\n" . \ + $SendNotification2 ({ 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" . \ @@ -68,7 +68,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: " . \ [ / %PATH% access-list get $AccessList comment ]) false; -- cgit v1.2.3-54-g00ecf