check non-active PPPoE users
Posted: Mon Mar 01, 2021 5:57 pm
trying to get a script to display non-active pppoe users. so far I've got
this will stop as soon as it find the first user that is not active.
I tried to use something like inside the foreach loop:
but cannot get this to work. appreciate any help!
yes i know we should use a radius server. once I find the time to add it I will.
Code: Select all
foreach pppuser in=[/ppp secret find ] do={
: local pppname [/ppp secret get $pppuser name]
:local ip [/ppp active get value-name=address [find name=$pppname]]
##; log warning $pppname
}
I tried to use something like inside the foreach loop:
Code: Select all
if ($ip!=true)
do={:log warning "user Offline "}
yes i know we should use a radius server. once I find the time to add it I will.