mirror of
https://git.openwrt.org/feed/packages.git
synced 2025-12-20 01:20:12 +08:00
ddns-scripts: remove minimum 5 minute wait
To check if the update was successful. Not all DDNS implementations have such huge latencies updating their services. nsupdate for example, updates immediately and the update is immediately checkable. Add new check_interval_min value to be able to set a check interval lower than the previously hard-coded 5 minutes. Fixes: #20564 Signed-off-by: Brian J. Murrell <brian@interlinx.bc.ca>
This commit is contained in:
committed by
Florian Eckert
parent
e564f6953d
commit
63308ab213
@@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=ddns-scripts
|
||||
PKG_VERSION:=2.8.2
|
||||
PKG_RELEASE:=81
|
||||
PKG_RELEASE:=82
|
||||
|
||||
PKG_LICENSE:=GPL-2.0
|
||||
|
||||
|
||||
@@ -157,8 +157,9 @@ trap "trap_handler 15" 15 # SIGTERM Termination
|
||||
# ip_script full path and name of your script to detect current IP
|
||||
# ip_interface physical interface to use for detecting
|
||||
#
|
||||
# check_interval check for changes every !!! checks below 10 minutes make no sense because the Internet
|
||||
# check_unit 'days' 'hours' 'minutes' !!! needs about 5-10 minutes to sync an IP-change for an DNS entry
|
||||
# check_interval check for changes every
|
||||
# check_interval_min check_interval minimum value (used to be check_interval's minimum value of 300 seconds)
|
||||
# check_unit 'days' 'hours' 'minutes'
|
||||
#
|
||||
# force_interval force to send an update to your service if no change was detected
|
||||
# force_unit 'days' 'hours' 'minutes' !!! force_interval="0" runs this script once for use i.e. with cron
|
||||
@@ -292,9 +293,10 @@ fi
|
||||
|
||||
# compute update interval in seconds
|
||||
get_seconds CHECK_SECONDS ${check_interval:-10} ${check_unit:-"minutes"} # default 10 min
|
||||
get_seconds CHECK_SECONDS_MIN ${check_interval_min:-5} ${check_unit:-"minutes"}
|
||||
get_seconds FORCE_SECONDS ${force_interval:-72} ${force_unit:-"hours"} # default 3 days
|
||||
get_seconds RETRY_SECONDS ${retry_interval:-60} ${retry_unit:-"seconds"} # default 60 sec
|
||||
[ $CHECK_SECONDS -lt 300 ] && CHECK_SECONDS=300 # minimum 5 minutes
|
||||
[ $CHECK_SECONDS -lt 300 ] && CHECK_SECONDS=$CHECK_SECONDS_MIN # minimum 5 minutes
|
||||
[ $FORCE_SECONDS -gt 0 -a $FORCE_SECONDS -lt $CHECK_SECONDS ] && FORCE_SECONDS=$CHECK_SECONDS # FORCE_SECONDS >= CHECK_SECONDS or 0
|
||||
write_log 7 "check interval: $CHECK_SECONDS seconds"
|
||||
write_log 7 "force interval: $FORCE_SECONDS seconds"
|
||||
|
||||
Reference in New Issue
Block a user