Linux Posted December 14, 2015 Report Share Posted December 14, 2015 Алтернатива на скрипт-а за changeip.com ############################################## # CHANGE THE FOLLOWING ACCORDING TO YOUR CREDENTIALS # Syed Jahanzaib / aacable at hotmail dot com # #################################################### :global ddnsuser DYNU_USER :global ddnspass "DYNU_PASSWORD" :global theinterface "WAN_INTERFACE_NAME" :global ddnshost "YOUR_DYNU_HOSTNAME.dynu.com" #### Donot change below this line #### :global ipddns [:resolve $ddnshost]; :global ipfresh [ /ip address get [/ip address find interface=$theinterface ] address ] :if ([ :typeof $ipfresh ] = nil ) do={ :log info ("DynuDDNS: No IP address on $theinterface .") } else={ :for i from=( [:len $ipfresh] - 1) to=0 do={ :if ( [:pick $ipfresh $i] = "/") do={ :set ipfresh [:pick $ipfresh 0 $i]; } } :if ($ipddns != $ipfresh) do={ :log info ("DynuDDNS: IP-Dynu = $ipddns") :log info ("DynuDDNS: IP-Fresh = $ipfresh") :log info "DynuDDNS: Update IP needed, Sending UPDATE...!" :global str "/nic/update?hostname=$ddnshost&myip=$ipfresh" /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 $ipfresh :log info "DynuDDNS: IP updated to $ipfresh!" } else={ :log info "DynuDDNS: dont need changes"; } } #################################################### Източник: Цък Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now