VPN dialup connect ip update for dynamic adress VPN server

then adding a new vpn client if you put in a name for the server it is being changed to ip adress instead!!! correct for the momen but the server is a dynamic adress any script for solve this problem.

regards Leo

here is my script for this

:global pptp-interface “interface”
:global pptp-connect-host “x.dyndns.pro”

:global pptp-host-ip [:resolve $pptp-connect-host]
:global pptp-connect-to [/interface pptp-client get $pptp-interface connect-to]
:if ($pptp-host-ip != $pptp-connect-to) do={
:log info “Updating VPN server ip”
/interface pptp-client set $pptp-interface connect-to=$pptp-host-ip}