I would like to write a script which automatically kills all Hotspot accounts that were used (uptime != 0) since the script was last called. Unfortunately, I seem to still have some issues understanding the scripting language.
Here is what I have today:
Code: Select all
[admin@microtik] /ip hotspot user> /system script print
Flags: I - invalid
0 name="kill-used-wlan-accounts" owner="admin" policy=ftp,reboot,read,write,policy,test,winbox,password,sniff
last-started=jan/20/2009 15:12:00 run-count=31 source=
:foreach a in=[/ip hotspot user find uptime!=0 ] do={
:put $a
:put [/ip hotspot get $a name]
}
[admin@microtik] /ip hotspot user> /system script run 0
*1
211AuthHot
*cb
*cc
*cd
*ce
*cf
*d0
*13a
[admin@microtik] /ip hotspot user>
Can anybody please enlighten me? Thanks in advanced.
Greetings
Marc