summaryrefslogtreecommitdiff
path: root/community/nsd/nsd.install
diff options
context:
space:
mode:
authorParabola <dev@list.parabolagnulinux.org>2011-04-05 14:26:38 +0000
committerParabola <dev@list.parabolagnulinux.org>2011-04-05 14:26:38 +0000
commit415856bdd4f48ab4f2732996f0bae58595092bbe (patch)
treeede2018b591f6dfb477fe9341ba17b9bc000fab9 /community/nsd/nsd.install
Tue Apr 5 14:26:38 UTC 2011
Diffstat (limited to 'community/nsd/nsd.install')
-rw-r--r--community/nsd/nsd.install20
1 files changed, 20 insertions, 0 deletions
diff --git a/community/nsd/nsd.install b/community/nsd/nsd.install
new file mode 100644
index 000000000..274ce0beb
--- /dev/null
+++ b/community/nsd/nsd.install
@@ -0,0 +1,20 @@
+post_install () {
+ getent group nsd &>/dev/null || groupadd -r nsd >/dev/null
+ getent passwd nsd &>/dev/null || useradd -r -g nsd -d /dev/null -s /bin/false -c nsd nsd >/dev/null
+ chown nsd:nsd /var/db/nsd
+ chmod 700 /var/db/nsd
+ install -o nsd -d /var/run/nsd
+ cat <<EOF
+==> First write a /etc/nsd/nsd.conf (see /etc/nsd/nsd.conf.sample)
+==> Next, start with: /etc/rc.d/nsd rebuild; /etc/rc.d/nsd start
+EOF
+}
+
+pre_remove() {
+ /etc/rc.d/nsd stop
+}
+
+post_remove() {
+ getent passwd nsd &>/dev/null && userdel nsd >/dev/null
+ getent group nsd &>/dev/null && groupdel nsd >/dev/null
+}