mirror of
https://github.com/novatiq/packages.git
synced 2026-04-30 07:28:39 +01:00
ddns-scripts: Update to Version 2.1.0-1 see description
- fixed postinst and prerm in Makefile - implementation of provider specific update scripts into services and services_ipv6 file. first Provider "no-ip.com" - Thanks to DarkStarXxX for request and testing - finished uci/ddns wiki at http://wiki.openwrt.org/doc/uci/ddns - rewritten retry management - rewritten logging including following Issue 469 https://github.com/openwrt/packages/issues/469 - stop running sections on hotplug ifdown event (like start on ifup) - implement trap detection also kill "sleep" child processes SIGHUP to reload configuration (not really reloading, simply starting a new process) /etc/init.d/ddns reload implemented - code optimization - new provider LoopiaDNS.se Issue 494 https://github.com/openwrt/packages/issues/494 Signed-off-by: Christian Schoenebeck <christian.schoenebeck@gmail.com>
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
#
|
||||
# Please read ddns.sample
|
||||
# or http://wiki.openwrt.org/doc/uci/ddns
|
||||
#
|
||||
config ddns "global"
|
||||
option date_format "%F %R"
|
||||
@@ -9,8 +10,8 @@ config ddns "global"
|
||||
|
||||
|
||||
config service "myddns_ipv4"
|
||||
option service_name "dyndns.org"
|
||||
option domain "yourhost.dyndns.org"
|
||||
option service_name "example.org"
|
||||
option domain "yourhost.example.org"
|
||||
option username "your_username"
|
||||
option password "your_password"
|
||||
option interface "wan"
|
||||
|
||||
@@ -127,7 +127,7 @@ config service "myddns"
|
||||
###########
|
||||
# use HTTPS for secure communication with you DDNS provider
|
||||
# personally found some providers having problems when not sending
|
||||
# updates via HTTPS. Yyou must not specify "https://" in update_url.
|
||||
# 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
|
||||
@@ -139,8 +139,8 @@ config service "myddns"
|
||||
# the transfer program can find them. (might need package CA-certificates)
|
||||
# if you don't want to verify servers certificate (insecure) you should
|
||||
# this parameter to "IGNORE" (in capital letters)
|
||||
# default: "/etc/cacert" path where CA-certificate package is installed
|
||||
option cacert "/etc/cacert"
|
||||
# default: (none) path where CA-certificate package is installed
|
||||
option cacert "/etc/ssl/certs"
|
||||
|
||||
###########
|
||||
# for logging and control if everything work fine you can get information inside
|
||||
@@ -210,11 +210,10 @@ config service "myddns"
|
||||
option force_ipversion "0"
|
||||
|
||||
###########
|
||||
# normally the current (in the internet) registered ip is detected using the
|
||||
# Normally the current (in the internet) registered ip is detected using the
|
||||
# local defined name lookup policies (i.e. /etc/resolve.conf etc.)
|
||||
# Specify here a DNS server to use instead of the defaults.
|
||||
# you can use hostname or ip address
|
||||
# IPv6 address must be in squared brackets "[...]"
|
||||
# i.e. "google-public-dns-a.google.com"
|
||||
# default: none
|
||||
# option dns_server "google-public-dns-a.google.com"
|
||||
@@ -236,6 +235,7 @@ config service "myddns"
|
||||
# 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 "[...]"
|
||||
# default: none
|
||||
# option proxy ''
|
||||
|
||||
@@ -247,7 +247,7 @@ config service "myddns"
|
||||
# wait this time before verify if update was successful send.
|
||||
# !!! 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 entry’s: 'seconds' 'minutes' 'hours' 'days'
|
||||
# accepted unit entry’s: 'seconds' 'minutes' 'hours'
|
||||
# minimum 5 minutes == 300 seconds
|
||||
# default 10 minutes
|
||||
option check_interval '10'
|
||||
@@ -256,7 +256,7 @@ config service "myddns"
|
||||
###########
|
||||
# force to send an update to service provider, if no change was detected.
|
||||
# consult DDNS providers documentation if your DDNS entry might timeout.
|
||||
# accepted unit entry’s: 'seconds' 'minutes' 'hours' 'days'
|
||||
# accepted unit entry’s: '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
|
||||
@@ -276,7 +276,7 @@ config service "myddns"
|
||||
# if error happen on detecting, sending or updating the
|
||||
# script will retry the relevant action.
|
||||
# here you define the time to wait before retry is started
|
||||
# accepted unit entry’s: 'seconds' 'minutes' 'hours' 'days'
|
||||
# accepted unit entry’s: 'seconds' 'minutes'
|
||||
# default: 60 seconds
|
||||
option retry_interval '60'
|
||||
option retry_unit 'seconds'
|
||||
|
||||
@@ -1,8 +1,14 @@
|
||||
#!/bin/sh
|
||||
|
||||
if [ "$ACTION" = "ifup" ]; then
|
||||
. /usr/lib/ddns/dynamic_dns_functions.sh
|
||||
/etc/init.d/ddns enabled && start_daemon_for_all_ddns_sections "$INTERFACE"
|
||||
fi
|
||||
|
||||
|
||||
# there are other ACTIONs like ifupdate we don't need
|
||||
# so parse dynamic_dns_functions.sh only when needed
|
||||
case "$ACTION" in
|
||||
ifup)
|
||||
. /usr/lib/ddns/dynamic_dns_functions.sh
|
||||
/etc/init.d/ddns enabled && start_daemon_for_all_ddns_sections "$INTERFACE"
|
||||
;;
|
||||
ifdown)
|
||||
. /usr/lib/ddns/dynamic_dns_functions.sh
|
||||
stop_daemon_for_all_ddns_sections "$INTERFACE"
|
||||
;;
|
||||
esac
|
||||
|
||||
@@ -1,16 +1,26 @@
|
||||
#!/bin/sh /etc/rc.common
|
||||
START=95
|
||||
STOP=10
|
||||
|
||||
boot() {
|
||||
return 0
|
||||
}
|
||||
|
||||
reload() {
|
||||
killall -1 dynamic_dns_updater.sh # send SIGHUP
|
||||
}
|
||||
|
||||
restart() {
|
||||
stop
|
||||
sleep 1 # give time to shutdown
|
||||
start
|
||||
}
|
||||
|
||||
start() {
|
||||
. /usr/lib/ddns/dynamic_dns_functions.sh
|
||||
start_daemon_for_all_ddns_sections
|
||||
}
|
||||
|
||||
stop() {
|
||||
killall -9 dynamic_dns_updater.sh
|
||||
killall dynamic_dns_updater.sh
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user