Hi all, I run a small WISP in Cyprus and i am taking the plunge to switch over to RouterOS. Please bear with me, i have a programming background but RouterOS script is new to me. From what i have read on the forum, User Manager is not a very reliable option. What i want to do is, when a user logs in with a voucher code, the user is added to a mac bypass list and a date comment is added to the entry. This bit i have done by borrowing some code found on the forum.
:foreach user in=[/ip hotspot active find] do={
:local date [ /system clock get date ]
:local ip [/ip hotspot active get $user address];
:local mac [/ip hotspot active get $user mac-address];
:local username [/ip hotspot active get $user user];
:foreach binding in=[/ip hotspot ip-binding find address=$ip] do={
/ip hotspot ip-binding remove $binding;
}
/ip hotspot ip-binding add type=bypassed mac-address=$mac address=0.0.0.0 comment=$date;
}
What i would like to do is have a scheduled script that runs once per day that removes users and ip bindings that are older than 1 month, in effect giving the user one month internet access without showing the login screen until the month is up. Can anyone here help me with this?
Best regards
Andy Georgiades.