Page 1 of 1

Restart when no active hotspot users?

Posted: Thu Jun 07, 2012 6:30 pm
by bigguns
Hi there,
I'm looking for a method to restart my RB's when there are no active hotspot users, on a weekly base.
If at the point of the restart schedule there are users, it keeps trying every 15 minutes to see if there are any active users.

Could someone help me with creating this please? I think it would be a great addition to the wiki as many people need to start their RB's to keep them fresh!

Re: Restart when no active hotspot users?

Posted: Thu Jun 07, 2012 10:18 pm
by c0d3rSh3ll
add a script
{
local user [len [ip hotspot active find]]
if ($user=0) do={/system reboot}
}

and then a scheduler for run the script

Re: Restart when no active hotspot users?

Posted: Fri Jun 08, 2012 2:52 am
by bigguns
Thank you very much for that. Karma +1

Is there anyway I can add a range/address IP in the hotspot to exclude in that script?