Can script update both PPTP clients ?

  • HI chaps,
    I dial 2 PPTP tunnels to the same ddns address using a mikrotik router.
    I found the script below on the net which works well and updates PPTP client1.
    Can this script be modded to update PPTP client 2 as well or must I duplicate this script to do that ?
    Just think it will be neater if the one script can update both PPTP clients.
    Cheers for any help.


    script:


    :global vpn-interface-name "pptp-out1"
    :global vpn-dns-name "client.noip.com"
    :global new-vpn-ip [:resolve $vpn-dns-name]
    :global current-vpn-ip [/interface pptp-client get $vpn-interface-name connect-to]
    :if ($current-vpn-ip != $new-vpn-ip) do={/interface pptp-client set [findname=$vpn-interface-name] connect-to=$new-vpn-ip}

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!