From: Brian J. Murrell Date: Thu, 23 Feb 2023 20:01:46 +0000 (-0500) Subject: ddns-scripts: remove minimum 5 minute wait X-Git-Url: http://git.99rst.org/?a=commitdiff_plain;h=63308ab21357d5f23ff506f5a1a91ebf368500ec;p=openwrt-packages.git 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 --- diff --git a/net/ddns-scripts/Makefile b/net/ddns-scripts/Makefile index e39ebb371..8330d7b66 100644 --- a/net/ddns-scripts/Makefile +++ b/net/ddns-scripts/Makefile @@ -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 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 f14941f30..3815e3f07 100644 --- a/net/ddns-scripts/files/usr/lib/ddns/dynamic_dns_updater.sh +++ b/net/ddns-scripts/files/usr/lib/ddns/dynamic_dns_updater.sh @@ -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"