summaryrefslogtreecommitdiffstats
path: root/debian/bind9.postrm
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--debian/bind9.postrm19
1 files changed, 19 insertions, 0 deletions
diff --git a/debian/bind9.postrm b/debian/bind9.postrm
new file mode 100644
index 0000000..8e28807
--- /dev/null
+++ b/debian/bind9.postrm
@@ -0,0 +1,19 @@
+#!/bin/sh
+
+set -e
+
+#DEBHELPER#
+
+if [ "$1" = "purge" ]; then
+ rm -f /etc/bind/rndc.key /etc/default/bind9
+ rmdir /etc/bind >/dev/null 2>&1 || true
+ rm -f /etc/apparmor.d/force-complain/usr.sbin.named >/dev/null 2>&1 || true
+ rm -f /var/lib/bind/bind9-default.md5sum
+ 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