This script not working. If I change $temp != $b to $temp = $b, nothing happing
I think problem is in the beginning, because start-once run count not changed and if I run start-once manually, script not send email…
How can I fix it?
:if ([/system scheduler get check run-count]<=1) do={
/system script run start-once
}
:global temp
:global b
:set temp $a
:set b [ /ip address get [/ip address find interface=ether1] address ]
:if ($temp != $b) do={
/tool e-mail send to=my@email.com subject=“The dynamic IP gets changed on host $b”
:set a $b
}
#start-once
:global a
:set a [/ip address get [/ip address find interface=ether1] address ]