diff options
author | Christian Hesse <mail@eworm.de> | 2024-03-08 17:32:12 +0100 |
---|---|---|
committer | Christian Hesse <mail@eworm.de> | 2024-03-12 20:37:57 +0100 |
commit | ba2df80f073caf6b426def177b217d1b37954d7f (patch) | |
tree | 5dadd74e56ded840e62e82127a9315c8769bfd83 /hotspot-to-wpa-cleanup.template.rsc | |
parent | 19802c0b6977f9467fada4ace3cab017dd98964b (diff) | |
parent | 242ecef012f5208b6fa088a1222d0d5477e5b2ed (diff) |
Merge branch 'LogPrint' into next
Diffstat (limited to 'hotspot-to-wpa-cleanup.template.rsc')
-rw-r--r-- | hotspot-to-wpa-cleanup.template.rsc | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/hotspot-to-wpa-cleanup.template.rsc b/hotspot-to-wpa-cleanup.template.rsc index c46d75d..6f3b3e1 100644 --- a/hotspot-to-wpa-cleanup.template.rsc +++ b/hotspot-to-wpa-cleanup.template.rsc @@ -19,7 +19,7 @@ :local ScriptName [ :jobname ]; :global EitherOr; - :global LogPrintExit2; + :global LogPrint; :global ParseKeyValueStore; :global ScriptLock; @@ -44,8 +44,8 @@ :foreach Lease in=[ /ip/dhcp-server/lease/find where dynamic \ mac-address=($ClientVal->"mac-address") ] do={ :if (($DHCPServers->[ /ip/dhcp-server/lease/get $Lease server ]) > 0s) do={ - $LogPrintExit2 info $ScriptName ("Client with mac address " . ($ClientVal->"mac-address") . \ - " connected to WPA, making lease static.") false; + $LogPrint info $ScriptName ("Client with mac address " . ($ClientVal->"mac-address") . \ + " connected to WPA, making lease static."); /ip/dhcp-server/lease/make-static $Lease; /ip/dhcp-server/lease/set comment=($ClientVal->"comment") $Lease; } @@ -59,8 +59,8 @@ :local ClientVal [ /interface/wifi/access-list/get $Client ]; :if ([ :len [ /ip/dhcp-server/lease/find where !dynamic comment~"^hotspot-to-wpa:" \ mac-address=($ClientVal->"mac-address") ] ] = 0) do={ - $LogPrintExit2 info $ScriptName ("Client with mac address " . ($ClientVal->"mac-address") . \ - " did not connect to WPA, removing from access list.") false; + $LogPrint info $ScriptName ("Client with mac address " . ($ClientVal->"mac-address") . \ + " did not connect to WPA, removing from access list."); /caps-man/access-list/remove $Client; /interface/wifi/access-list/remove $Client; } @@ -70,8 +70,8 @@ :foreach Lease in=[ /ip/dhcp-server/lease/find where !dynamic status="waiting" \ server=$Server last-seen>$Timeout comment~"^hotspot-to-wpa:" ] do={ :local LeaseVal [ /ip/dhcp-server/lease/get $Lease ]; - $LogPrintExit2 info $ScriptName ("Client with mac address " . ($LeaseVal->"mac-address") . \ - " was not seen for " . ($LeaseVal->"last-seen") . ", removing.") false; + $LogPrint info $ScriptName ("Client with mac address " . ($LeaseVal->"mac-address") . \ + " was not seen for " . ($LeaseVal->"last-seen") . ", removing."); /caps-man/access-list/remove [ find where comment~"^hotspot-to-wpa:" \ /interface/wifi/access-list/remove [ find where comment~"^hotspot-to-wpa:" \ mac-address=($LeaseVal->"mac-address") ]; |