My provider renews the lease every 2 days.
I get these entries in log:
#
May/16/2020 16:05:05 dhcp,critical,error dhcp-client on ether1 lost IP address 44.33.22.11 - received NAK from dhcp server 10.20.30.40
May/16/2020 16:05:05 dhcp,info dhcp-client on ether1 got IP address 44.33.22.11
#
My script in the script section of DHCP client does not work.
#check DHCP-lease for ether1
:if ([/ip dhcp-client get [find interface="ether1"] status] = "bound") do={
/system script run refreshdyndns
:log info "DHCP lease ready"
}
The script 'refreshdyndns' itself runs OK in a scheduled task or started manually.
What does the script have to look like for it to work?