Greetings,
I need a script that in the absence of traffic or alternatively after 30 minutes disable the ppp connection.
I tried:
PPP - Profiles - ‘my_profile’ - script - On UP
{
: delay 1800;
/ppp secret disable $user;
/ppp active remove name=$user;
}
but it does not work. Any ideas on how to fix it?
I thank you all
Greetings
Marcello
I answer myself
:log warning ("Cliente $user connesso")
:delay 1800
/ppp secret disable $user
/ppp active remove [find name=$user]
:log warning ("Cliente $user disabilitato")
Perché complicare il pane?
Simply fixing the error do the results, why write all this?
And also OP has already fixed it.
Wrong syntax:
/ppp active remove name=$user
remove accept only “active” item(s) id(s)
Correct syntax:
/ppp active remove [find where name=$user]
find the “active” id of the desired name, and pass it to remove.
Instead
/ppp secret disable $user
disable accept or directly the username or
the “secret” username id, like remove
/ppp secret disable [find where name=$user]
but “active” id and “secret” id are not the same number, each section have it’s own id for each users.