i have Problem after the update to 6.20 and 6.22 in the PPP
I use this line of script :
:local newIP [/ip address get [find interface=“PPPoE 1”] address];
Previously if you are connected to the value of the variable ($newIP) is External IP
And if it is not connected, the value Internal IP like “192.168.2.10”
but after the update to 6.20 and 6.22
If it is not connected to be without value and not work script ???
example this script :
/system script add name=“PPPoEmonitorIPchange” source={
:global currentIP1;
:global newIP1 [/ip address get [find interface=“pppoe-ISP1”] address];
:if ($newIP1 != $currentIP1) do={
:put “ip address $currentIP1 changed to $newIP1”;
:set currentIP1 $newIP1;
:if ([:pick $newIP1 0 8] = “192.168.”) do={
/tool e-mail send to=“mypersonalemail@gmail.com” subject=(“Disconnected - ISP1”) body=(“$currentIP1”)
} else={
/tool e-mail send to=“mypersonalemail@gmail.com subject=([/ip address get [find where interface=“pppoe-ISP1”] address] . " - ISP1”) body=(“$currentIP1”)
}
}
/system scheduler add name=IPcheck interval=1m on-event=PPPoEmonitorIPchange