After upgrading from 5.25 to 6 stopped working of the script, as follows:
/ip dhcp-client get “ether1-gateway” gateway
script error: no such item
on 5.25 it`s work fine
:global newgw [/ip dhcp-client get “ether1-gateway” gateway]
:global activegw [/ip route get [find comment=“isp1”] gateway ]
:if ($newgw != $activegw) do={
/ip route set [find comment=“isp1”] gateway=$newgw
}