From 9d63220bf65ac75b178166e5cb7a7399ee885d12 Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Tue, 8 Jul 2014 16:18:00 +0200 Subject: [PATCH] core80: Update crontab for ddns --- config/rootfiles/core/80/update.sh | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/config/rootfiles/core/80/update.sh b/config/rootfiles/core/80/update.sh index 78034bc934..5ff84641d1 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... -- 2.39.5