summaryrefslogtreecommitdiffstats
path: root/debian/bind9.postrm
blob: 27239c0d5ac1114d04da8b44d64f997500b4f1fe (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/bin/sh

set -e

#DEBHELPER#

if [ "$1" = "purge" ]; then
	rm -f /etc/bind/rndc.key
	rmdir /etc/bind >/dev/null 2>&1 || true
	rm -f /etc/apparmor.d/force-complain/usr.sbin.named >/dev/null 2>&1 || true
	rmdir /var/lib/bind || true
	# delete bind daemon user, if it exists
	if getent passwd bind > /dev/null ; then
		deluser  --quiet bind > /dev/null || true
	fi
fi

exit 0