From 02c3c2ebb70738a1562843c6b64cb645773bef5d Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Sun, 5 Feb 2012 15:07:34 +0000 Subject: [PATCH] [packages_10.03.2] ddns-scripts: merge r29909, r29977 SVN-Revision: 30201 --- net/ddns-scripts/Makefile | 2 +- net/ddns-scripts/files/etc/config/ddns | 20 ++++++----- .../files/usr/lib/ddns/dynamic_dns_updater.sh | 33 +++++++++++++++++++ net/ddns-scripts/files/usr/lib/ddns/services | 14 ++++++++ 4 files changed, 60 insertions(+), 9 deletions(-) diff --git a/net/ddns-scripts/Makefile b/net/ddns-scripts/Makefile index 15eb0ec07e..03153e0a1d 100644 --- a/net/ddns-scripts/Makefile +++ b/net/ddns-scripts/Makefile @@ -2,7 +2,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=ddns-scripts PKG_VERSION:=1.0.0 -PKG_RELEASE:=17 +PKG_RELEASE:=18 PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME) diff --git a/net/ddns-scripts/files/etc/config/ddns b/net/ddns-scripts/files/etc/config/ddns index db84aaeeab..4784c82488 100644 --- a/net/ddns-scripts/files/etc/config/ddns +++ b/net/ddns-scripts/files/etc/config/ddns @@ -48,14 +48,16 @@ # it) and how often we need to force an update ( many services # will expire your domain if you don't connect and do an update # every so often). Use the "check_interval" to specify how -# often to check whether an update is necessary, and the -# "force_interval" option to specify how often to force an -# update. Specify the units for these values with the "check_unit" -# and the "force_unit" options. Units can be "days", "hours", -# "minutes" or "seconds". The default force_unit is hours and the -# default check_unit is seconds. The default check_interval is -# 600 seconds, or ten minutes. The default force_interval is -# 72 hours or 3 days. +# often to check whether an update is necessary, the "retry_interval" +# to specify how often to retry in case the update has failed, and +# the "force_interval" option to specify how often to force an +# update. Specify the units for these values with the "check_unit", +# the "retry_init" and the "force_unit" options. Units can be +# "days", "hours", "minutes" or "seconds". The default force_unit +# is hours, the default retry_unit is seconds and the default +# check_unit is seconds. The default check_interval is 600 seconds, +# or ten minutes. The default retry_interval is 60 seconds, or one +# minute. The default force_interval is 72 hours or 3 days. # # ######################################################### @@ -77,6 +79,8 @@ config service "myddns" option force_unit "hours" option check_interval "10" option check_unit "minutes" + option retry_interval "60" + option retry_unit "seconds" #option ip_source "interface" #option ip_interface "eth0.1" diff --git a/net/ddns-scripts/files/usr/lib/ddns/dynamic_dns_updater.sh b/net/ddns-scripts/files/usr/lib/ddns/dynamic_dns_updater.sh index e8e08e7206..d1f8460bfc 100755 --- a/net/ddns-scripts/files/usr/lib/ddns/dynamic_dns_updater.sh +++ b/net/ddns-scripts/files/usr/lib/ddns/dynamic_dns_updater.sh @@ -68,6 +68,11 @@ then check_interval=600 fi +if [ -z "$retry_interval" ] +then + retry_interval=60 +fi + if [ -z "$check_unit" ] then check_unit="seconds" @@ -203,6 +208,28 @@ esac +#compute retry interval in seconds +case "$retry_unit" in + "days" ) + retry_interval_seconds=$(($retry_interval*60*60*24)) + ;; + "hours" ) + retry_interval_seconds=$(($retry_interval*60*60)) + ;; + "minutes" ) + retry_interval_seconds=$(($retry_interval*60)) + ;; + "seconds" ) + retry_interval_seconds=$retry_interval + ;; + * ) + #default is seconds + retry_interval_seconds=$retry_interval + ;; +esac + + + verbose_echo "force seconds = $force_interval_seconds" verbose_echo "check seconds = $check_interval_seconds" @@ -289,6 +316,12 @@ do #here we actually connect, and perform the update update_output=$( $retrieve_prog "$final_url" ) + if [ $? -gt 0 ] + then + verbose_echo "update failed" + sleep $retry_interval_seconds + continue + fi verbose_echo "Update Output:" verbose_echo "$update_output" diff --git a/net/ddns-scripts/files/usr/lib/ddns/services b/net/ddns-scripts/files/usr/lib/ddns/services index 7c3439c62e..82461d270c 100644 --- a/net/ddns-scripts/files/usr/lib/ddns/services +++ b/net/ddns-scripts/files/usr/lib/ddns/services @@ -40,3 +40,17 @@ # dnsExit.com free dynamic DNS update url "dnsexit.com" "http://www.dnsexit.com/RemoteUpdate.sv?login=[USERNAME]&password=[PASSWORD]&host=[DOMAIN]&myip=[IP]" + +# OVH +"ovh.com" "http://[USERNAME]:[PASSWORD]@www.ovh.com/nic/update?system=dyndns&hostname=[DOMAIN]&myip=[IP]" + +# dns-o-matic is a free service by opendns.com for updating multiple hosts and +# dynamic dns services in one api call. To update all your configured services +# at once, use "all.dnsomatic.com as the hostname. +"dnsomatic.com" "http://[USERNAME]:[PASSWORD]@updates.dnsomatic.com/nic/update?hostname=[DOMAIN]&myip=[IP]" + +# 3322.org +"3322.org" "http://[USERNAME]:[PASSWORD]@members.3322.org/dyndns/update?system=dyndns&hostname=[DOMAIN]&myip=[IP]" + +# namecheap.com +"namecheap.com" "http://dynamicdns.park-your-domain.com/update?host=[USERNAME]&domain=[DOMAIN]&password=[PASSWORD]&ip=[IP]" -- 2.30.2