ddns-scripts: new Version 2.1.0-2

- moved /usr/lib/ddns/dynamic_dns_lucihelper.sh from luci-app-ddns into this package
	(Github openwrt/luci issue 251)
	(OpenWrt Trac tickets 18326 18347)
- fix: dynamic_dns_update.sh did not loop
	(OpenWrt Trac ticket 18336)
- add provider cloudflare.com IPv4 and IPv6 (Thanks to Paul for support and testing)
	(OpenWrt Trac ticket 12500)
- modified detection, if dynamic_dns_fuctions are used by dynamic_dns_lucihelper.sh
- redirect stdout of wget,curl,host,nslookup,nc etc to /tmp/ddns_$$.dat and *.err instead of variables
- extended error detection in get_local_ip function
- modified verify of option ip_script to allow parameters, when calling
- add provider selfhost.de IPv4
- add provider no-ip.pl (nothing to do with no-ip.com)
	(Github openwrt/packages issue #542)
	IPv4 (tested) and also added for
	IPv6 (NOT tested) because client IP is autodetected be provider
- add getlocalip_sample.sh as sample script for usage of
	option ip_source 'script'  together with
	option ip_script '/usr/lib/ddns/getlocalip.sh -4'
- cleanup whitespaces at line ends

Signed-off-by: Christian Schoenebeck <christian.schoenebeck@gmail.com>
This commit is contained in:
Christian Schoenebeck
2014-11-15 21:28:01 +01:00
parent a23e8f6bc1
commit ab2b229ad6
15 changed files with 550 additions and 262 deletions
+1 -1
View File
@@ -27,4 +27,4 @@ config service "myddns_ipv6"
option interface "wan6"
option ip_source "network"
option ip_network "wan6"
+25 -25
View File
@@ -4,18 +4,18 @@
# and used by ddns-scripts and corresponding LuCI application
#
# Inside your ddns configuration file (/etc/config/ddns)
# you might not find some of below described options.
# you might not find some of below described options.
# This is because you don't need to define options
# if using there defaults. The LuCI application will delete
# options that configured to there default values.
#
# If you have a working ddns configuration from old ddns-scripts (Version 1.x)
# everything will function the same with new scripts
# everything will function the same with new scripts
# without any changes to the configuration.
#
# If you like to use this file for your configuration then
# use a copy, because the used software to modify the
# configuration files will throw away all empty lines
# use a copy, because the used software to modify the
# configuration files will throw away all empty lines
# and those starting with # (comments).
#
@@ -55,10 +55,10 @@ config ddns "global"
# for each service you want to serve you need a separate configuration
# if you need IPv4 and IPv6 you need to setup 2 separate configurations
# with different names. (i.e. "myddns_ipv4" and "myddns_ipv6")
# do not use white-spaces or dashes "-" or "@" ":" "!" or
# do not use white-spaces or dashes "-" or "@" ":" "!" or
# other special characters inside name.
config service "myddns"
########### Basic settings ########################
###########
@@ -74,22 +74,22 @@ config service "myddns"
###########
# defines the network as defined in /etc/config/network
# to be monitored for up/down events to start via hotplug
# to be monitored for up/down events to start via hotplug
default: "wan" for IPv4
default: "wan6" for IPv6
option interface "wan"
###########
# Next you need to specify the name of the service you are
# Next you need to specify the name of the service you are
# connecting to "eg. dyndns.org". The format of the update
# urls for several different dynamic dns services is specified
# in the "/usr/lib/ddns/services" file for IPv4 and in
# in the "/usr/lib/ddns/services" file for IPv4 and in
# "/usr/lib/ddns/service_ipv6" file. This list is hardly complete
# as there are many, many different dynamic dns services.
# If your service is on the list you can merely specify it with the
# If your service is on the list you can merely specify it with the
# "service_name" option. Otherwise you will need to determine
# the format of the url to update with. You can either add an
# entry to the "/usr/lib/ddns/services" or "services_ipv6" file
# entry to the "/usr/lib/ddns/services" or "services_ipv6" file
# or specify this with the "update_url" option.
# If your ddns provider doesn't work with ddns-scripts because
# there are additional parameters or other special thinks to be done,
@@ -100,18 +100,18 @@ config service "myddns"
# default: none
option service_name "dyndns.org"
# sample:
# sample:
# "http://[USERNAME]:[PASSWORD]@members.dyndns.org/nic/update?hostname=[DOMAIN]&myip=[IP]"
# option update_url ""
# sample:
# sample:
# "/usr/lib/ddns/update_sample.sh"
# option update_script ""
###########
# You must specify your domain/host name, your username and your password
# as you get from you DDNS provider. Keep an eye on providers help pages.
#
#
# Your DNS name / replace [DOMAIN] in update_url
# default: none
option domain ""
@@ -126,14 +126,14 @@ config service "myddns"
###########
# use HTTPS for secure communication with you DDNS provider
# personally found some providers having problems when not sending
# updates via HTTPS. You must not specify "https://" in update_url.
# personally found some providers having problems when not sending
# updates via HTTPS. You must not specify "https://" in update_url.
# It's modified by the scripts themselves
# Needs GNU Wget (with SSL support) or cURL to be installed.
# default: "0" do not use HTTPS
option use_https "0"
# if using HTTPS (see above) the transfer program tries to verify
# if using HTTPS (see above) the transfer program tries to verify
# the providers server certificate. For verification there needs to be
# the counterpart on this machine. Specify the path or path/file where
# the transfer program can find them. (might need package CA-certificates)
@@ -176,7 +176,7 @@ config service "myddns"
option ip_source "network"
option ip_network "wan"
# ip_source "web" additional uses option ip_url and detects the current
# ip_source "web" additional uses option ip_url and detects the current
# local ip from special web sides that response with the ip address of
# calling host. If you are behind a firewall/NAT this is the best option
# since none of the local networks or interfaces will have the external ip.
@@ -201,8 +201,8 @@ config service "myddns"
# option ip_script ""
###########
# force_ipversion option will set the "-4" respectively "-6" parameter
# on command line of transfer and DNS lookup program.
# force_ipversion option will set the "-4" respectively "-6" parameter
# on command line of transfer and DNS lookup program.
# So the whole communication uses the selected IP version between both ends.
# needs GNU Wget or cURL installed for transfer and
# BIND's host for DNS lookup.
@@ -230,9 +230,9 @@ config service "myddns"
# If a Proxy is need to access HTTP/HTTPS pages on the WEB
# it can be configured here also for sending updates to the
# DDNS provider. If you configured use_https='1' above, you
# need to setup your HTTPS proxy here, otherwise your
# need to setup your HTTPS proxy here, otherwise your
# HTTP proxy. !!! You should not detect your current IP
# ip_source='web' (see above) because this request is also
# ip_source='web' (see above) because this request is also
# send via the configured proxy !!!
# Syntax: [user:password@]proxy:port !port is required !
# IPv6 address must be in squared brackets "[...]"
@@ -245,7 +245,7 @@ config service "myddns"
# defines the time interval to check if local IP has changed
# After the first start and first update send, the system will
# wait this time before verify if update was successful send.
# !!! checks below 5 minutes make no sense because the Internet
# !!! checks below 5 minutes make no sense because the Internet
# needs about 5-10 minutes to sync an IP-change to all DNS servers !!!
# accepted unit entrys: 'seconds' 'minutes' 'hours'
# minimum 5 minutes == 300 seconds
@@ -259,8 +259,8 @@ config service "myddns"
# accepted unit entrys: 'minutes' 'hours' 'days'
# minimum needs to be greater or equal check interval (see above)
# A special setting of '0' is allowed, which forces the script to run once.
# It sends an update, verify if update was accepted by DNS
# (retry if not) and finish. Useful if you want to start by your own (i.e. cron)
# It sends an update, verify if update was accepted by DNS
# (retry if not) and finish. Useful if you want to start by your own (i.e. cron)
# default 3 days == 72 hours
option force_interval '72'
option force_unit 'hours'
+2 -2
View File
@@ -7,7 +7,7 @@ boot() {
}
reload() {
killall -1 dynamic_dns_updater.sh # send SIGHUP
killall -1 dynamic_dns_updater.sh 2>/dev/null # send SIGHUP
}
restart() {
@@ -22,5 +22,5 @@ start() {
}
stop() {
killall dynamic_dns_updater.sh
killall dynamic_dns_updater.sh 2>/dev/null
}