how to disable comment from 1 to 720
i create the script but its not working.
:if ($Comment=1-720) do={
: log info " the user: $User has Temporary Disconnected!"
[ /ppp secret disable $i ]
[ /ppp active remove [find name=$User] ]
.
how to disable comment from 1 to 720
i create the script but its not working.
:if ($Comment=1-720) do={
: log info " the user: $User has Temporary Disconnected!"
[ /ppp secret disable $i ]
[ /ppp active remove [find name=$User] ]
.
:do {/ppp secret
:foreach ix in=[find where (comment>"0" && comment<"721")] do={
:local sNAME [get $ix name];
disable $ix;
:log warning message=("The user: " . $sNAME . " has Temporary Disconnected!");
:do {/ppp active remove numbers=[find where name=$sNAME]
} on-error={:log error message=("Disconnecting " . $sNAME . " Failed");}
}
} on-error={:log error message="script failed..."}
wow thats great but i have problem in the script sir
all of my users where remove after the script is run
Well, what was your question?
after i run the script sir all my users were disable even there is no comment attached on thier name
okay wait i will fix it
updated, check it
thanks u sir ur superb.
last sir. how can i send the name and remote address in firewall address list after the time comment is 0
coming from ppp secret
example
in firewall address list
name: reminder customer
addrss: ip from remote address in ppp secret
comment: name of my user in ppp secret
try with

@ADahi
Pleas stop quoting the whole post above you.
Click Post Reply in bottom of post.
Quote only what is needed. (part of post)
You only make it harder to read.
@Jotne
are you PHP web designer?
No I am not
i tried it sir but the problem is even the comment is not 0 the remote ip is still there.
i need it to show the remote ip in firewall/address list when comment become 0 in ppp/secret.
thanks sir
Updated working
:do {/ppp secret
:local LIST "reminder";
:foreach ix in=[find where comment="0"] do={
:local sNAME [get $ix name];
:if ([/ppp active find where name=$sNAME]!="") do={
:local IPadd [/ppp active get number=[find where name=$sNAME] address];
:do {/ip firewall address-list
add list=$LIST address=$IPadd comment=$sNAME
} on-error={:log error message=("move address of " . $sNAME . " to address-list failed, maybe exist")}
}
}
} on-error={:log error message="script failed..."}
I’m looking for PHP web designer
not working sir theres no creation of ip and name in reminder in firewall addres list also i see in logs “script failed”
@runbound
updated check it again
thank you sir its working now. so helpful. thank you very very very very much
sir one more please
is it possible to send email to my subscriber to inform that they thier subscription is nearly expire because in ppp secret theres no email box there
so possible is write it in a comment like
0 / xxxx@gmail.com
where 0 is my expiration
why not, explain your project in detail