Community discussions

MUM Europe 2020
Topic Author
Posts: 46
Joined: Sun May 18, 2014 3:01 am

Removing Hotspot Users after 6.34rc12

Fri Jul 22, 2016 10:07 am

Sooooo... I see Mikrotik have added a Data limit thing in the Latest Versions of ROS - YAY

However it is still lacking one key feature - Removal of accounts @ Time of Day e.g. no matter what time someone logs on, all data reset @ say 9 am.

Also, in implementing this - they have broken my Script :( ... well the removal of users script.

Here is the update

/system scheduler

add interval=1d name="Remove Users" on-event=":foreach counter in=[/ip hotspot user find] do={:if (\$counter != \"*0\")  do={/ip hotspot user remove \$counter}}" policy=read,write,policy,test,sniff,sensitive start-date=dec/10/2014 start-time=06:00:00
The problem is that a default "User" is added, and cannot be removed.  Eventually I found the string that it showed as in the Router (hence the != "*0") and managed to run the remove command without touching the untouchable default user.

Admittedly, the new feature looks nice (and is about time) - however having the "Profile" settings under the "User" list is a little bit dickey, but at least they are getting there... Please don't break my scripts next time though :P

Who is online

Users browsing this forum: FATechID and 10 guests