Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update cron execution interval #754

Merged
merged 3 commits into from
Dec 27, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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