hotspot-to-wpa-cleanup: clean up daily only

This commit is contained in:
Christian Hesse 2024-11-12 18:02:26 +01:00
parent f1533b8962
commit ae655646ba
3 changed files with 6 additions and 3 deletions

View file

@ -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.");

View file

@ -68,7 +68,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.");

View file

@ -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.");