summaryrefslogtreecommitdiff
path: root/template
diff options
context:
space:
mode:
authorAndreas Baumann <mail@andreasbaumann.cc>2016-01-23 20:41:46 +0100
committerAndreas Baumann <mail@andreasbaumann.cc>2016-01-23 20:41:46 +0100
commit43e45851e0252e752389513211c9a57bda9bb83e (patch)
tree0d51ec994360b052521a11884d016bb80f752585 /template
parent6ae34b299bb711f63da760e30ba800b05d408555 (diff)
downloadOpenBSD-firewall-43e45851e0252e752389513211c9a57bda9bb83e.tar.gz
OpenBSD-firewall-43e45851e0252e752389513211c9a57bda9bb83e.tar.bz2
- added nsd instead of named
- having nsd server a local 'lan' zone (and reverse zone)
Diffstat (limited to 'template')
-rwxr-xr-xtemplate/usr/sbin/restart_dns13
1 files changed, 13 insertions, 0 deletions
diff --git a/template/usr/sbin/restart_dns b/template/usr/sbin/restart_dns
index bbe8cdb..e36d8d7 100755
--- a/template/usr/sbin/restart_dns
+++ b/template/usr/sbin/restart_dns
@@ -1,9 +1,22 @@
#!/bin/sh
+echo "nsd: stopping ..."
+pkill nsd
+sleep 3
+
echo "unbound: stopping ..."
pkill unbound
sleep 3
+echo "nsd: starting authorative name server ..."
+rm -rf /tmp/var/nsd
+cp -R /etc/nsd /tmp/var/nsd
+chown -R root:_nsd /tmp/var/nsd/{db,etc,run}
+chmod 0770 /tmp/var/nsd/{db,run,run/xfr}
+
+echo "nsd: restarting ..."
+/usr/sbin/nsd
+
echo "unbound: redeploy from persistent /etc/unbound to /var/unboud ..."
rm -rf /tmp/var/unbound
cp -R /etc/unbound /tmp/var/unbound