From ae655646ba21cdf4638e6001a49c9d3cf849bc08 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Tue, 12 Nov 2024 18:02:26 +0100 Subject: hotspot-to-wpa-cleanup: clean up daily only --- hotspot-to-wpa-cleanup.wifi.rsc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'hotspot-to-wpa-cleanup.wifi.rsc') diff --git a/hotspot-to-wpa-cleanup.wifi.rsc b/hotspot-to-wpa-cleanup.wifi.rsc index c814705..b73f1a9 100644 --- a/hotspot-to-wpa-cleanup.wifi.rsc +++ b/hotspot-to-wpa-cleanup.wifi.rsc @@ -62,7 +62,8 @@ :foreach Server,Timeout in=$DHCPServers do={ :foreach Lease in=[ /ip/dhcp-server/lease/find where !dynamic status="waiting" \ - server=$Server last-seen>$Timeout comment~"^hotspot-to-wpa:" ] do={ + server=$Server last-seen>($Timeout + [ /system/clock/get time ]) \ + comment~"^hotspot-to-wpa:" ] do={ :local LeaseVal [ /ip/dhcp-server/lease/get $Lease ]; $LogPrint info $ScriptName ("Client with mac address " . ($LeaseVal->"mac-address") . \ " was not seen for " . $Timeout . ", removing."); -- cgit v1.2.3-70-g09d2