Page 1 of 1

Script to delete user in "IP DHCP SERVER LEASES"

Posted: Sun Jun 30, 2024 11:12 pm
by FRANKMUNOZAPURE
Greetings gentlemen, I have a script that eliminates the clients connected to the HOTSPOT and it works very well for me, but I would like that same script to also eliminate that user in IP DHCP SERVER LEASES, I need your help, thanks in advance. Here I leave the script.
:local comment "IN USE"
:local userprofile [ip hotspot user get [find where name="$user"] profile]

:if ([/ip hotspot user get $user comment]="") do={[/ip hotspot user set $user comment=$comment]}

[/system scheduler 
add comment= [/ip hotspot user profile get [find where name="$userprofile"] name] name=$user on-event="/ip hotspot user remove \"$user\" \r\
  \n/system scheduler remove [find where name=\"$user\"] \r\
  \n\r\
" interval= [/ip hotspot user profile get [find where name="$userprofile"] session-timeout]]

Re: Script to delete user in "IP DHCP SERVER LEASES"

Posted: Mon Jul 01, 2024 10:12 am
by rextended
Is not easyer set the DHCP timeout to 10 min?

Re: Script to delete user in "IP DHCP SERVER LEASES"

Posted: Mon Jul 01, 2024 2:08 pm
by FRANKMUNOZAPURE
Thanks for responding REX, but what would the script be like?

Re: Script to delete user in "IP DHCP SERVER LEASES"

Posted: Mon Jul 01, 2024 11:04 pm
by rextended
Seriously?

Re: Script to delete user in "IP DHCP SERVER LEASES"

Posted: Tue Jul 02, 2024 1:54 am
by FRANKMUNOZAPURE
REX. I need help with this script please

Re: Script to delete user in "IP DHCP SERVER LEASES"

Posted: Tue Jul 02, 2024 3:27 am
by nichky
brother, read above what @rextended adviced.

No one is willing to write a complicated script something if the solution is with one click (already explained)

Re: Script to delete user in "IP DHCP SERVER LEASES"

Posted: Fri Jul 05, 2024 3:26 am
by FRANKMUNOZAPURE
Can anybody help me please.

I will thank you eternally.

Re: Script to delete user in "IP DHCP SERVER LEASES"

Posted: Fri Jul 05, 2024 4:16 pm
by rextended
To me you're kidding us.