mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-28 11:43:25 +02:00
Merge branch 'ddns' into next
This commit is contained in:
@@ -4,7 +4,6 @@ etc/rc.d/init.d/dhcrelay
|
||||
etc/rc.d/init.d/dnsmasq
|
||||
srv/web/ipfire/cgi-bin/ovpnmain.cgi
|
||||
srv/web/ipfire/cgi-bin/routing.cgi
|
||||
usr/local/bin/setddns.pl
|
||||
usr/sbin/dhcrelay
|
||||
var/ipfire/general-functions.pl
|
||||
var/ipfire/langs
|
||||
|
||||
@@ -47,6 +47,25 @@ rm -f \
|
||||
/opt/pakfire/db/installed/meta-libgpg-error \
|
||||
/opt/pakfire/db/rootfiles/libgpg-error
|
||||
|
||||
# Generate ddns configuration file
|
||||
/srv/web/ipfire/cgi-bin/ddns.cgi
|
||||
|
||||
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 <<EOF >> /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...
|
||||
|
||||
Reference in New Issue
Block a user