X-Git-Url: https://git.cyclocoop.org/?p=lhc%2Fateliers.git;a=blobdiff_plain;f=etc%2Fsv%2Fnsd3%2Flocal.sh;fp=etc%2Fsv%2Fnsd3%2Flocal.sh;h=0000000000000000000000000000000000000000;hp=373a8336e294395a7eaa134427e20bd3bdf7e45a;hb=04b8e1c63f1dc6ebadd577c54ee4006bb360320c;hpb=b24af3f2f139d71bc84cd0c807dca1c84cee833f diff --git a/etc/sv/nsd3/local.sh b/etc/sv/nsd3/local.sh deleted file mode 100644 index 373a833..0000000 --- a/etc/sv/nsd3/local.sh +++ /dev/null @@ -1,40 +0,0 @@ -"$tool"/local/apt-get-install nsd -"$tool"/local/insserv-remove nsd3 - -sudo install -d -m 750 -o root -g nsd \ - /etc/nsd3/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 \ - -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 - then m4 \ - --define=ZONE_DOMAIN=$zone \ - --define=ZONE_SERIAL=$(cd "$tool" && git log -1 --format="%ct" -- etc/nsd3/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 - fi | - sudo install -m 440 -o root -g nsd /dev/stdin \ - /etc/nsd3/zone.d/"$zone".zone - cat <<-EOF - zone: - name: $zone - zonefile: /etc/nsd3/zone.d/$zone.zone - $(cat "$tool"/etc/nsd3/zone.d/"$zone".conf) - EOF - done -} | -sudo install -m 640 -o root -g nsd /dev/stdin \ - /etc/nsd3/nsd.conf - -"$tool"/local/runit-sv-start "$sv" -sudo nsd-control reload