Skip to content

Commit

Permalink
dynDNS: pdate cron execution interval (#754)
Browse files Browse the repository at this point in the history
  • Loading branch information
TomTurnschuh authored and nachoparker committed Dec 28, 2018
1 parent 2e9440d commit 4307b14
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion etc/ncp-config.d/DDNS_spDYN.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 6 additions & 0 deletions update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 4307b14

Please sign in to comment.