ChangeIP update script in v4.16 broken?

Anyone having issues with ChangeIP update script?

I log throughout the script to see where it dies and it does so on setting the global ddnssystem line.

Has there been any changes to RouterOS to break this:

:global ddnssystem ("mt-" . [/system package get [/system package find name=system] version] )

FYI How I know it fails there…

:global ddnsuser "YourChangeIPUserID"
:global ddnspass "PASSWORD"
:global ddnshost "MyRouterHostname.example.org"
:global ddnsinterface "ether1"
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# END OF USER DEFINED CONFIGURATION
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

:log ("Works1")
:global ddnssystem ("mt-" . [/system package get [/system package find name=system] version] )
:log("DoesntWork")

:global ddnsip [ /ip address get [/ip address find interface=$ddnsinterface] address ]
:global ddnslastip

My script will not log “DoesntWork”

Any help is much appreciated.

This is invalid syntax:

:log(“DoesntWork”)

You need a space after :log - Let me know if you still have any issues. This should be working fine under 4.16.

Yeah it was me making an error in the posting. But in actuality it was right in the script (I didn’t copy and paste the code from the script, I retyped for one reason or another).

:log info ("starting")
:global ddnssystem ("mt-" . [/system package get [/system package find name=system] version] )
:log info ("number2")
:global ddnsip [ /ip address get [/ip address find interface=$ddnsinterface] address ]
:log info ("number3")

This does not log “number3” - copied directly from the script.

Any ideas?

Hello - does your interface name have any dashes or spaces in it? Possibly you need to quote it…

:global ddnsip [ /ip address get [/ip address find interface=“$ddnsinterface”] address ]

Add quotes around the variable. Also, can you post the results of this from a manual command line?

:put [/ip address find interface=“ether1”]

I used ether1 since thats what you had written, just use whatever interface you are running ddns on. It’s possible you have more than 1 IP address on that interface?

There is a new script we are testing that uses remote IP detection, this might work better for you. I will post it shortly.

Boy, I have got to remember to check for responses! Guess what, an IP change has put me back on this issue.

THANK YOU for your response, I suck for not replying 3 months later. - Sorry

Here is the output you asked for:


[bill@Remote1] > :put [/ip address find interface="ether1"]
*1;*4
[bill@Remote1] >

One thing I noticed, I simply made the default 192.168.88.1 address inactive, this is most likely my problem since 2 IPs would be present on that ether1 interface. This messes up the script I recon?