From: Michael Tremer Date: Tue, 8 Jul 2014 14:18:00 +0000 (+0200) Subject: core80: Update crontab for ddns X-Git-Url: http://git.ipfire.org/?p=people%2Fteissler%2Fipfire-2.x.git;a=commitdiff_plain;h=9d63220bf65ac75b178166e5cb7a7399ee885d12 core80: Update crontab for ddns --- diff --git a/config/rootfiles/core/80/update.sh b/config/rootfiles/core/80/update.sh index 78034bc93..5ff84641d 100644 --- a/config/rootfiles/core/80/update.sh +++ b/config/rootfiles/core/80/update.sh @@ -52,6 +52,19 @@ rm -f \ touch /var/ipfire/ddns/ddns.conf chown nobody.nobody /var/ipfire/ddns/ddns.conf +# Update crontab +sed -i /var/spool/cron/root.orig -e "/setddns.pl/d" + +grep -q /usr/bin/ddns /var/spool/cron/root.orig || cat <> /var/spool/cron/root.orig + +# Update dynamic DNS records every five minutes. +# Force an update once a month +*/5 * * * * [ -f "/var/ipfire/red/active" ] && /usr/bin/ddns update-all +3 2 1 * * [ -f "/var/ipfire/red/active" ] && /usr/bin/ddns update-all --force +EOF + +fcrontab -z &>/dev/null + sync # This update need a reboot...