From 4307b14f27d203b488ef368a6ff766eb7b72ce44 Mon Sep 17 00:00:00 2001 From: TomTurnschuh <36013390+TomTurnschuh@users.noreply.github.com> Date: Thu, 27 Dec 2018 15:14:06 +0100 Subject: [PATCH] dynDNS: pdate cron execution interval (#754) --- etc/ncp-config.d/DDNS_spDYN.sh | 2 +- update.sh | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/etc/ncp-config.d/DDNS_spDYN.sh b/etc/ncp-config.d/DDNS_spDYN.sh index e6b724236..380b136ee 100644 --- a/etc/ncp-config.d/DDNS_spDYN.sh +++ b/etc/ncp-config.d/DDNS_spDYN.sh @@ -105,7 +105,7 @@ configure() # Adds file to cron to run script for DNS record updates and change permissions touch $CRONFILE - echo "10 * * * * root $INSTALLPATH/spdnsUpdater.sh $DOMAIN_ $TOKEN_ $IPv6_ >/dev/null 2>&1" > "$CRONFILE" + echo "*/5 * * * * root $INSTALLPATH/spdnsUpdater.sh $DOMAIN_ $TOKEN_ $IPv6_ >/dev/null 2>&1" > "$CRONFILE" chmod +x "$CRONFILE" # First-time execution of update script and print response from spdns.de server diff --git a/update.sh b/update.sh index 49f91a461..2ee811c1e 100755 --- a/update.sh +++ b/update.sh @@ -134,6 +134,12 @@ EOF [[ ! -f /.docker-image ]] && { : } + + # Update cronfile for DDNS_spDYN if existing + cd /etc/cron.d + [[ -f spdnsupdater ]] && { + sed -i "s|.* [* * * *]|*/5 * * * *|" spdnsupdater + } # update nc-restore cd "$CONFDIR" &>/dev/null