The most of my clients in the hotspot they dint make “logout” when shutdown the computer.
I need one script to check witch clients is active and after to delete the cookies for the non active users from the cookies list.
I have ready one script to check who is realy active client, but dont delete the cookies.
:foreach i in=[/ip hotspot active find] do={
:if ([/ip hotspot active get $i uptime]>00:59:00) do={
/ip hotspot active remove $i
}
}
add the following to your do loop after the “remove” command
do={/ip hotspot cookie remove [find user=[/ip hotspot user get $i name]]}
There is an inherent weakness in you script. What happens within the first minute of login? You script will forcefully logout the user and remove his cookie.