I just bought two MikroTik devices (HAP AC2) to replace my old Asus router. To complete the transition I need to update a DynDNS Server. While reading the documentation I saw the new feature of the dhcp-client lease script. It seems that this would be a better alternative than using one of the many existing dyndns-scripts which use the scheduler for polling.
The script with lots of debug log messages looks like this:
Code: Select all
# DynDns afraid.org
:log info ("UpdateDynDNS: start");
:local UpdateUrl "https://sync.afraid.org/u/xxxxxxxxxxxxxx/";
:log info ("UpdateDynDNS: afterVariable");
:local DynDnsResult [/tool fetch mode=https url="$UpdateUrl" as-value output=user];
:log info ("UpdateDynDNS: afterFetch");
:local ResultData ($DynDnsResult->"data");
:log info ("UpdateDynDNS: $ResultData");
:log info ("UpdateDynDNS: end");
But when I put this code into the script part of the dhcp-client it just stops after the line :log info ("UpdateDynDNS: afterVariable"); without any error message. Even when I try to run the script from the dhcp-client indirectly using "/system script run dyndns" it just stops before the fetch.
Is there a known limitation of using fetch in the dhcp-client script? Or is there something wrong with my script? I couldn't find any information on this topic.
Thank you for your help