diff options
Diffstat (limited to 'community/nsd/install')
-rw-r--r-- | community/nsd/install | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/community/nsd/install b/community/nsd/install new file mode 100644 index 000000000..d90c83521 --- /dev/null +++ b/community/nsd/install @@ -0,0 +1,19 @@ +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 +} + +post_upgrade() { + [[ `vercmp $2 3.2.9` -lt 0 ]] && cat <<\EOF +==> The database format was updated; please run `nsdc rebuild`. +EOF +} + +post_remove() { + getent passwd nsd &>/dev/null && userdel nsd >/dev/null + getent group nsd &>/dev/null && groupdel nsd >/dev/null + true +} |