From 04b8e1c63f1dc6ebadd577c54ee4006bb360320c Mon Sep 17 00:00:00 2001 From: Ludovic CHEVALIER Date: Wed, 21 Sep 2016 20:17:06 +0200 Subject: [PATCH] =?utf8?q?Modifications=C2=A0:=20=20=20=20=20=20=20=20=20e?= =?utf8?q?tc/nsd3/nsd.conf=20->=20etc/nsd/nsd.conf?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- etc/{nsd3 => nsd}/nsd.conf | 14 +++++------ .../zone.d/changedechaine.org.conf | 0 .../zone.d/changedechaine.org.zone.m4 | 0 etc/{nsd3 => nsd}/zone.d/chatperche.org.conf | 0 .../zone.d/chatperche.org.zone.m4 | 0 etc/{nsd3 => nsd}/zone.d/cyclocoop.org.conf | 0 .../zone.d/cyclocoop.org.zone.m4 | 0 .../zone.d/heureux-cyclage.org.conf | 0 .../zone.d/heureux-cyclage.org.zone.m4 | 0 .../zone.d/labecaneajules.fr.conf | 0 .../zone.d/labecaneajules.fr.zone.m4 | 0 .../zone.d/lesjantesdunord.org.conf | 0 .../zone.d/lesjantesdunord.org.zone.m4 | 0 etc/{nsd3 => nsd}/zone.d/ptitvelo.net.conf | 0 etc/{nsd3 => nsd}/zone.d/ptitvelo.net.zone.m4 | 0 etc/{nsd3 => nsd}/zone.d/veli-velo.org.conf | 0 .../zone.d/veli-velo.org.zone.m4 | 0 etc/{nsd3 => nsd}/zone.d/velocampus.net.conf | 0 .../zone.d/velocampus.net.zone.m4 | 0 etc/{nsd3 => nsd}/zone.d/wiklou.org.conf | 0 etc/{nsd3 => nsd}/zone.d/wiklou.org.zone.m4 | 0 etc/sv/{nsd3 => nsd}/local.sh | 24 +++++++++---------- etc/sv/{nsd3 => nsd}/run | 8 +++---- 23 files changed, 23 insertions(+), 23 deletions(-) rename etc/{nsd3 => nsd}/nsd.conf (79%) rename etc/{nsd3 => nsd}/zone.d/changedechaine.org.conf (100%) rename etc/{nsd3 => nsd}/zone.d/changedechaine.org.zone.m4 (100%) rename etc/{nsd3 => nsd}/zone.d/chatperche.org.conf (100%) rename etc/{nsd3 => nsd}/zone.d/chatperche.org.zone.m4 (100%) rename etc/{nsd3 => nsd}/zone.d/cyclocoop.org.conf (100%) rename etc/{nsd3 => nsd}/zone.d/cyclocoop.org.zone.m4 (100%) rename etc/{nsd3 => nsd}/zone.d/heureux-cyclage.org.conf (100%) rename etc/{nsd3 => nsd}/zone.d/heureux-cyclage.org.zone.m4 (100%) rename etc/{nsd3 => nsd}/zone.d/labecaneajules.fr.conf (100%) rename etc/{nsd3 => nsd}/zone.d/labecaneajules.fr.zone.m4 (100%) rename etc/{nsd3 => nsd}/zone.d/lesjantesdunord.org.conf (100%) rename etc/{nsd3 => nsd}/zone.d/lesjantesdunord.org.zone.m4 (100%) rename etc/{nsd3 => nsd}/zone.d/ptitvelo.net.conf (100%) rename etc/{nsd3 => nsd}/zone.d/ptitvelo.net.zone.m4 (100%) rename etc/{nsd3 => nsd}/zone.d/veli-velo.org.conf (100%) rename etc/{nsd3 => nsd}/zone.d/veli-velo.org.zone.m4 (100%) rename etc/{nsd3 => nsd}/zone.d/velocampus.net.conf (100%) rename etc/{nsd3 => nsd}/zone.d/velocampus.net.zone.m4 (100%) rename etc/{nsd3 => nsd}/zone.d/wiklou.org.conf (100%) rename etc/{nsd3 => nsd}/zone.d/wiklou.org.zone.m4 (100%) rename etc/sv/{nsd3 => nsd}/local.sh (56%) rename etc/sv/{nsd3 => nsd}/run (79%) diff --git a/etc/nsd3/nsd.conf b/etc/nsd/nsd.conf similarity index 79% rename from etc/nsd3/nsd.conf rename to etc/nsd/nsd.conf index 34be06a..1e0b965 100644 --- a/etc/nsd3/nsd.conf +++ b/etc/nsd/nsd.conf @@ -1,7 +1,7 @@ -# chroot: "/etc/nsd3" -database: "/var/lib/nsd3/nsd.db" +# chroot: "/etc/nsd" +database: "/var/lib/nsd/nsd.db" # debug-mode: no -# difffile: "/var/lib/nsd3/ixfr.db" +# difffile: "/var/lib/nsd/ixfr.db" hide-version: yes # identify the server (CH TXT ID.SERVER entry). # identity: "unidentified server" @@ -10,7 +10,7 @@ ipv4-edns-size: 4096 # ipv6-edns-size: 4096 # logfile: "/var/log/nsd.log" # nsid: "aabbccdd" -pidfile: "/run/nsd3/nsd.pid" +pidfile: "/run/nsd/nsd.pid" # NOTE: utilisé par nsdc reload pour envoyer SIGHUP ou SIGUSR1, # attention que SIGHUP fait changer le pid, et du coup fonctionne mal avec runsv # XXX: username doit pouvoir le supprimer. @@ -30,6 +30,6 @@ tcp-timeout: 120 username: nsd verbosity: 2 # xfrd-reload-timeout: 10 -# xfrdfile: "/var/lib/nsd3/xfrd.state" -zone-stats-file: "/var/log/nsd.stats" -zonesdir: "/etc/nsd3" +# xfrdfile: "/var/lib/nsd/xfrd.state" +#zone-stats-file: "/var/log/nsd.stats" +zonesdir: "/etc/nsd" diff --git a/etc/nsd3/zone.d/changedechaine.org.conf b/etc/nsd/zone.d/changedechaine.org.conf similarity index 100% rename from etc/nsd3/zone.d/changedechaine.org.conf rename to etc/nsd/zone.d/changedechaine.org.conf diff --git a/etc/nsd3/zone.d/changedechaine.org.zone.m4 b/etc/nsd/zone.d/changedechaine.org.zone.m4 similarity index 100% rename from etc/nsd3/zone.d/changedechaine.org.zone.m4 rename to etc/nsd/zone.d/changedechaine.org.zone.m4 diff --git a/etc/nsd3/zone.d/chatperche.org.conf b/etc/nsd/zone.d/chatperche.org.conf similarity index 100% rename from etc/nsd3/zone.d/chatperche.org.conf rename to etc/nsd/zone.d/chatperche.org.conf diff --git a/etc/nsd3/zone.d/chatperche.org.zone.m4 b/etc/nsd/zone.d/chatperche.org.zone.m4 similarity index 100% rename from etc/nsd3/zone.d/chatperche.org.zone.m4 rename to etc/nsd/zone.d/chatperche.org.zone.m4 diff --git a/etc/nsd3/zone.d/cyclocoop.org.conf b/etc/nsd/zone.d/cyclocoop.org.conf similarity index 100% rename from etc/nsd3/zone.d/cyclocoop.org.conf rename to etc/nsd/zone.d/cyclocoop.org.conf diff --git a/etc/nsd3/zone.d/cyclocoop.org.zone.m4 b/etc/nsd/zone.d/cyclocoop.org.zone.m4 similarity index 100% rename from etc/nsd3/zone.d/cyclocoop.org.zone.m4 rename to etc/nsd/zone.d/cyclocoop.org.zone.m4 diff --git a/etc/nsd3/zone.d/heureux-cyclage.org.conf b/etc/nsd/zone.d/heureux-cyclage.org.conf similarity index 100% rename from etc/nsd3/zone.d/heureux-cyclage.org.conf rename to etc/nsd/zone.d/heureux-cyclage.org.conf diff --git a/etc/nsd3/zone.d/heureux-cyclage.org.zone.m4 b/etc/nsd/zone.d/heureux-cyclage.org.zone.m4 similarity index 100% rename from etc/nsd3/zone.d/heureux-cyclage.org.zone.m4 rename to etc/nsd/zone.d/heureux-cyclage.org.zone.m4 diff --git a/etc/nsd3/zone.d/labecaneajules.fr.conf b/etc/nsd/zone.d/labecaneajules.fr.conf similarity index 100% rename from etc/nsd3/zone.d/labecaneajules.fr.conf rename to etc/nsd/zone.d/labecaneajules.fr.conf diff --git a/etc/nsd3/zone.d/labecaneajules.fr.zone.m4 b/etc/nsd/zone.d/labecaneajules.fr.zone.m4 similarity index 100% rename from etc/nsd3/zone.d/labecaneajules.fr.zone.m4 rename to etc/nsd/zone.d/labecaneajules.fr.zone.m4 diff --git a/etc/nsd3/zone.d/lesjantesdunord.org.conf b/etc/nsd/zone.d/lesjantesdunord.org.conf similarity index 100% rename from etc/nsd3/zone.d/lesjantesdunord.org.conf rename to etc/nsd/zone.d/lesjantesdunord.org.conf diff --git a/etc/nsd3/zone.d/lesjantesdunord.org.zone.m4 b/etc/nsd/zone.d/lesjantesdunord.org.zone.m4 similarity index 100% rename from etc/nsd3/zone.d/lesjantesdunord.org.zone.m4 rename to etc/nsd/zone.d/lesjantesdunord.org.zone.m4 diff --git a/etc/nsd3/zone.d/ptitvelo.net.conf b/etc/nsd/zone.d/ptitvelo.net.conf similarity index 100% rename from etc/nsd3/zone.d/ptitvelo.net.conf rename to etc/nsd/zone.d/ptitvelo.net.conf diff --git a/etc/nsd3/zone.d/ptitvelo.net.zone.m4 b/etc/nsd/zone.d/ptitvelo.net.zone.m4 similarity index 100% rename from etc/nsd3/zone.d/ptitvelo.net.zone.m4 rename to etc/nsd/zone.d/ptitvelo.net.zone.m4 diff --git a/etc/nsd3/zone.d/veli-velo.org.conf b/etc/nsd/zone.d/veli-velo.org.conf similarity index 100% rename from etc/nsd3/zone.d/veli-velo.org.conf rename to etc/nsd/zone.d/veli-velo.org.conf diff --git a/etc/nsd3/zone.d/veli-velo.org.zone.m4 b/etc/nsd/zone.d/veli-velo.org.zone.m4 similarity index 100% rename from etc/nsd3/zone.d/veli-velo.org.zone.m4 rename to etc/nsd/zone.d/veli-velo.org.zone.m4 diff --git a/etc/nsd3/zone.d/velocampus.net.conf b/etc/nsd/zone.d/velocampus.net.conf similarity index 100% rename from etc/nsd3/zone.d/velocampus.net.conf rename to etc/nsd/zone.d/velocampus.net.conf diff --git a/etc/nsd3/zone.d/velocampus.net.zone.m4 b/etc/nsd/zone.d/velocampus.net.zone.m4 similarity index 100% rename from etc/nsd3/zone.d/velocampus.net.zone.m4 rename to etc/nsd/zone.d/velocampus.net.zone.m4 diff --git a/etc/nsd3/zone.d/wiklou.org.conf b/etc/nsd/zone.d/wiklou.org.conf similarity index 100% rename from etc/nsd3/zone.d/wiklou.org.conf rename to etc/nsd/zone.d/wiklou.org.conf diff --git a/etc/nsd3/zone.d/wiklou.org.zone.m4 b/etc/nsd/zone.d/wiklou.org.zone.m4 similarity index 100% rename from etc/nsd3/zone.d/wiklou.org.zone.m4 rename to etc/nsd/zone.d/wiklou.org.zone.m4 diff --git a/etc/sv/nsd3/local.sh b/etc/sv/nsd/local.sh similarity index 56% rename from etc/sv/nsd3/local.sh rename to etc/sv/nsd/local.sh index 373a833..180a6d0 100644 --- a/etc/sv/nsd3/local.sh +++ b/etc/sv/nsd/local.sh @@ -1,40 +1,40 @@ "$tool"/local/apt-get-install nsd -"$tool"/local/insserv-remove nsd3 +"$tool"/local/insserv-remove nsd sudo install -d -m 750 -o root -g nsd \ - /etc/nsd3/zone.d + /etc/nsd/zone.d { cat <<-EOF server: ip-address: $local_ipv4 ip4-only: yes EOF - cat "$tool"/etc/nsd3/nsd.conf - for zone in $(find "$tool"/etc/nsd3/zone.d \ + cat "$tool"/etc/nsd/nsd.conf + for zone in $(find "$tool"/etc/nsd/zone.d \ -mindepth 1 -maxdepth 1 -type f \ -name "*.conf" \ -printf '%f\n') do zone=${zone%.conf} - if test -e "$tool"/etc/nsd3/zone.d/"$zone".zone.m4 + if test -e "$tool"/etc/nsd/zone.d/"$zone".zone.m4 then m4 \ --define=ZONE_DOMAIN=$zone \ - --define=ZONE_SERIAL=$(cd "$tool" && git log -1 --format="%ct" -- etc/nsd3/zone.d/"$zone".zone.m4) \ + --define=ZONE_SERIAL=$(cd "$tool" && git log -1 --format="%ct" -- etc/nsd/zone.d/"$zone".zone.m4) \ --define=LOCAL_IP4=$local_ipv4 \ - "$tool"/etc/nsd3/zone.d/"$zone".zone.m4 - else cat "$tool"/etc/nsd3/zone.d/"$zone".zone + "$tool"/etc/nsd/zone.d/"$zone".zone.m4 + else cat "$tool"/etc/nsd/zone.d/"$zone".zone fi | sudo install -m 440 -o root -g nsd /dev/stdin \ - /etc/nsd3/zone.d/"$zone".zone + /etc/nsd/zone.d/"$zone".zone cat <<-EOF zone: name: $zone - zonefile: /etc/nsd3/zone.d/$zone.zone - $(cat "$tool"/etc/nsd3/zone.d/"$zone".conf) + zonefile: /etc/nsd/zone.d/$zone.zone + $(cat "$tool"/etc/nsd/zone.d/"$zone".conf) EOF done } | sudo install -m 640 -o root -g nsd /dev/stdin \ - /etc/nsd3/nsd.conf + /etc/nsd/nsd.conf "$tool"/local/runit-sv-start "$sv" sudo nsd-control reload diff --git a/etc/sv/nsd3/run b/etc/sv/nsd/run similarity index 79% rename from etc/sv/nsd3/run rename to etc/sv/nsd/run index bf28183..a24143e 100755 --- a/etc/sv/nsd3/run +++ b/etc/sv/nsd/run @@ -3,10 +3,10 @@ exec 2>&1 sv=${PWD#/etc/sv/} install -d -m 770 -o nsd -g nsd \ - /run/nsd3 + /run/nsd -pkill -TERM -F /run/nsd3/nsd.pid || true -rm -f /run/nsd3/nsd.pid +pkill -TERM -F /run/nsd/nsd.pid || true +rm -f /run/nsd/nsd.pid # XXX: sv reload ou nsdc reload envoient SIGHUP à nsd # ce qui le détache de runsv et du coup il n'est plus suivi.. # comme on ne peut pas se rattacher à un processus, @@ -15,7 +15,7 @@ rm -f /run/nsd3/nsd.pid # les notify DNS sitôt une zone mise-à-jour. exec /usr/sbin/nsd \ - -c /etc/nsd3/nsd.conf \ + -c /etc/nsd/nsd.conf \ -d \ -N 1 \ -u nsd -- 2.20.1