Hello,
I have mu RB2011 on 6.39.2, and i can not get any No-Ip update script to work..
Is there really no option as for today?
Thank you.
:local noipuser "dsfargeg@dsfargeg.no"
:local noippass "password"
:local noiphost "dyndnshost"
:local inetinterface "sfp1"
:global previousIP
if ( [:len [/file find name=("no-ip_ddns_previousip.txt")]] > 0 ) do={
:set previousIP [/file get ("no-ip_ddns_previousip.txt") contents]
}
:if ([/interface get $inetinterface value-name=running]) do={
:local currentIP [/ip address get [find interface="$inetinterface" disabled=no] address]
:for i from=( [:len $currentIP] - 1) to=0 do={
:if ( [:pick $currentIP $i] = "/") do={
:set currentIP [:pick $currentIP 0 $i]
}
}
:if ($currentIP != $previousIP) do={
:log info "No-IP: Current IP ($currentIP) is not equal to previous IP ($previousIP), update needed"
:local url "http://dynupdate.no-ip.com/nic/update\3Fmyip=$currentIP"
:local noiphostarray
:set noiphostarray [:toarray $noiphost]
:foreach host in=$noiphostarray do={
:log info "No-IP: Sending update for $host"
/tool fetch url=($url . "&hostname=$host") user=$noipuser password=$noippass mode=http dst-path=("no-ip_ddns_update-" . $host . ".txt")
:log info "No-IP: Host $host updated on No-IP with IP $currentIP"
/file print file=("no-ip_ddns_previousip.txt")
:delay 3
/file set contents="$currentIP" ("no-ip_ddns_previousip.txt")
}
} else={
:log info "No-IP: Previous IP $previousIP is equal to current IP, no update needed"
}
} else={
:log info "No-IP: $inetinterface is not currently running, so therefore will not update."
}
/tool fetch url=("http://dynupdate.no-ip.com/nic/update\3Fhostname=host.domain.com") user=username password=password mode=http dst-path=("NoIpResponse.txt")
At me it stops at "Sending update for..."This works on my RB2011:
Code: Select all:local noipuser "dsfargeg@dsfargeg.no" :local noippass "password" :local noiphost "dyndnshost" :local inetinterface "sfp1" :global previousIP if ( [:len [/file find name=("no-ip_ddns_previousip.txt")]] > 0 ) do={ :set previousIP [/file get ("no-ip_ddns_previousip.txt") contents] } :if ([/interface get $inetinterface value-name=running]) do={ :local currentIP [/ip address get [find interface="$inetinterface" disabled=no] address] :for i from=( [:len $currentIP] - 1) to=0 do={ :if ( [:pick $currentIP $i] = "/") do={ :set currentIP [:pick $currentIP 0 $i] } } :if ($currentIP != $previousIP) do={ :log info "No-IP: Current IP ($currentIP) is not equal to previous IP ($previousIP), update needed" :local url "http://dynupdate.no-ip.com/nic/update\3Fmyip=$currentIP" :local noiphostarray :set noiphostarray [:toarray $noiphost] :foreach host in=$noiphostarray do={ :log info "No-IP: Sending update for $host" /tool fetch url=($url . "&hostname=$host") user=$noipuser password=$noippass mode=http dst-path=("no-ip_ddns_update-" . $host . ".txt") :log info "No-IP: Host $host updated on No-IP with IP $currentIP" /file print file=("no-ip_ddns_previousip.txt") :delay 3 /file set contents="$currentIP" ("no-ip_ddns_previousip.txt") } } else={ :log info "No-IP: Previous IP $previousIP is equal to current IP, no update needed" } } else={ :log info "No-IP: $inetinterface is not currently running, so therefore will not update." }
Code: Select all
/tool fetch address=dynupdate.no-ip.com src-path=("$url") mode=http user=$DDNSUser password=$DDNSPassword dst-path=("DDNS_no_ip")