blob: 274ce0bebe2b4aa0e2b3d806b3537982cf51d4b5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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
}
|