scritpt to update Changeip.com for mikrotik 3.27

Good time of day! Such a situation, using a script to changeip.com http://wiki.mikrotik.com/wiki/Dynamic_DNS_Update_Script_for_ChangeIP.com
The script should be updated only when the interface is changing ip. This is not the case at the first performance of the script, it performs the upgrade, but the next time you update it will update, hatya should not. And if the script immediately after the first run, it works, ie does not update as compared to the variable $ ddnslastip. Ie the impression that the version 3.27 does not hold the variables for more than 20 seconds. Who can recommend something?

let me get 3.27 installed on my test router and perform some QA. I will report back with a better script that handles some things better as well.

I would be grateful for the help!

An interesting fact that, everything works fine when the terminal opened. “new terminal” незнаю that the tricks … tried to roll back to version 3.24 - unsuccessfully. bug?