diff options
author | TomTurnschuh <36013390+TomTurnschuh@users.noreply.github.com> | 2018-12-27 17:14:06 +0300 |
---|---|---|
committer | nacho <nacho@ownyourbits.com> | 2018-12-28 20:02:50 +0300 |
commit | 4307b14f27d203b488ef368a6ff766eb7b72ce44 (patch) | |
tree | 78df57d4ca7dc21b8cd2b860a4287843c18ed729 | |
parent | 2e9440d9ce88926d9edc3c4843cfefadea60b271 (diff) |
dynDNS: pdate cron execution interval (#754)v0.67.11
-rw-r--r-- | etc/ncp-config.d/DDNS_spDYN.sh | 2 | ||||
-rwxr-xr-x | update.sh | 6 |
2 files changed, 7 insertions, 1 deletions
diff --git a/etc/ncp-config.d/DDNS_spDYN.sh b/etc/ncp-config.d/DDNS_spDYN.sh index e6b72423..380b136e 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 @@ -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 |