Skip to content

Commit 71e3f9d

Browse files
committed
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>
1 parent e564f69 commit 71e3f9d

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

net/ddns-scripts/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk
88

99
PKG_NAME:=ddns-scripts
1010
PKG_VERSION:=2.8.2
11-
PKG_RELEASE:=81
11+
PKG_RELEASE:=82
1212

1313
PKG_LICENSE:=GPL-2.0
1414

net/ddns-scripts/files/usr/lib/ddns/dynamic_dns_updater.sh

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -157,8 +157,9 @@ trap "trap_handler 15" 15 # SIGTERM Termination
157157
# ip_script full path and name of your script to detect current IP
158158
# ip_interface physical interface to use for detecting
159159
#
160-
# check_interval check for changes every !!! checks below 10 minutes make no sense because the Internet
161-
# check_unit 'days' 'hours' 'minutes' !!! needs about 5-10 minutes to sync an IP-change for an DNS entry
160+
# check_interval check for changes every
161+
# check_interval_min check_interval minimum value (used to be check_interval's minimum value of 300 seconds)
162+
# check_unit 'days' 'hours' 'minutes'
162163
#
163164
# force_interval force to send an update to your service if no change was detected
164165
# force_unit 'days' 'hours' 'minutes' !!! force_interval="0" runs this script once for use i.e. with cron
@@ -292,9 +293,10 @@ fi
292293

293294
# compute update interval in seconds
294295
get_seconds CHECK_SECONDS ${check_interval:-10} ${check_unit:-"minutes"} # default 10 min
296+
get_seconds CHECK_SECONDS_MIN ${check_interval_min:-5} ${check_unit:-"minutes"}
295297
get_seconds FORCE_SECONDS ${force_interval:-72} ${force_unit:-"hours"} # default 3 days
296298
get_seconds RETRY_SECONDS ${retry_interval:-60} ${retry_unit:-"seconds"} # default 60 sec
297-
[ $CHECK_SECONDS -lt 300 ] && CHECK_SECONDS=300 # minimum 5 minutes
299+
[ $CHECK_SECONDS -lt 300 ] && CHECK_SECONDS=$CHECK_SECONDS_MIN # minimum 5 minutes
298300
[ $FORCE_SECONDS -gt 0 -a $FORCE_SECONDS -lt $CHECK_SECONDS ] && FORCE_SECONDS=$CHECK_SECONDS # FORCE_SECONDS >= CHECK_SECONDS or 0
299301
write_log 7 "check interval: $CHECK_SECONDS seconds"
300302
write_log 7 "force interval: $FORCE_SECONDS seconds"

0 commit comments

Comments
 (0)