Új hozzászólás Aktív témák

  • kovyhun

    tag

    Sziasztok!
    Használ valaki Dynu ddns-t?
    Az oldalukon lévő script nem akar múködni:
    https://www.dynu.com/DynamicDNS/IPUpdateClient/Mikrotik-Dynamic-DNS
    Pár pontosvesszőt töröltem, van ahol az idézőjelet pótoltam, de még mindig nem jó, valószínű van még benne hiba, csak nem találom :(

    # get the current IP address from the internet
    /tool fetch mode=http address="checkip.dynu.com" src-path="/"
    dst-path="/dynu.checkip.html"
    :local result [/file get dynu.checkip.html contents]

    # parse the current IP result
    :local resultLen [:len $result]
    :local startLoc [:find $result ": " -1]
    :set startLoc ($startLoc + 2)
    :local currentIP [:pick $result $startLoc $resultLen]
    :global ddnsuser "your_Dynu_username"
    :global ddnspass "your_Dynu_password"
    :global ddnshost "your_Dynu_hostname"
    :global ipddns [:resolve $ddnshost]

    :if ($ipddns != $currentIP) do={
    :log info ("DynuDDNS: IP-Dynu = $ipddns")
    :log info ("DynuDDNS: IP-Fresh = $currentIP")
    :log info "DynuDDNS: Update IP needed, Sending UPDATE...!"
    :global str "/nic/update?hostname=$ddnshost&myip=$currentIP"
    :log info "currentIP is $currentIP"
    /tool fetch address=api.dynu.com src-path=$str mode=http user=$ddnsuser password=$ddnspass
    dst-path=("/Dynu.".$ddnshost)
    :delay 1
    :global str [/file find name="Dynu.$ddnshost"]
    /file remove $str
    :global ipddns $currentIP
    :log info "DynuDDNS: IP updated to $currentIP!"
    } else={
    :log info "DynuDDNS: No change needed"
    }

    Valakinek van ötlete?

Új hozzászólás Aktív témák