i am using a script that mail me my DSL ip when changed. but i have 4DSL lines and i need a script that check all DSL lines that i inter in it and mail me their ips.
i have
DSL1=pppoe-out1
DSL2=pppoe-out2
DSL3=pppoe-out3
DSL4=pppoe-out4
i am using a script that mail me my DSL ip when changed. but i have 4DSL lines and i need a script that check all DSL lines that i inter in it and mail me their ips.
i have
DSL1=pppoe-out1
DSL2=pppoe-out2
DSL3=pppoe-out3
DSL4=pppoe-out4
:global currentIPx;
:local newIP [/ip address get [find interface="pppoe-outx"] address];
:if ($newIP != $currentIPx) do={
:put "ip address $currentIPx changed to $newIP";
:set currentIPx $newIP;
/tool e-mail send from=ssss@ssss.com password=ssssssss
to=ssss@ssss.com subject="pppoe-outx IP Address "
body="pppoe-outx IP is $currentIPx" server=x.x.x.x port=587 tls=yes;
}
You can make a loop from 1 to for or write it 4 time. Then set scheduler to run e.g every 5 min
Thanks for your help.
plz solve me my 1 problem more.
tell me where i can put loop Statement.
and i want to inter delay in loop.
plz give me some more help. ![]()
where x is a variable.
/system scheduler
just start running the script
ok thanks its working.