However I have upgraded to MT 5.2 and this script no longer works. Any ideas as to why?
I have tried also a couple of other scripts and none of them seem to work.
Code: Select all
:global linkip
:global strsystemname [/system identity get name]
:global linkip [/ip address get [/ip address find interface=PPPoE-Interface] address]
:global linksysver ("Version-" . [/system package get system version] )
:if ([ :typeof $linklastip ] = nil ) do={ :global linklastip "0" }
:if ([ :typeof $linkip ] = nil ) do={
:log info ("WAN: No ip address present on interface, please check.")
} else={
:if ($linkip != $linklastip) do={
/tool e-mail send from=clientupdate@my.mailserver.com to=myemail@my.mailserver.com subject="$strsystemname" body="$linkip" server=my.mailserver.com
:log info "WAN: IP Changed Sending UPDATE!"
:global linklastip "$linkip"
} else={
:log info "WAN: IP Unchanged No update required."
}
}