summaryrefslogtreecommitdiffstats
path: root/debian/knot.postrm
diff options
context:
space:
mode:
Diffstat (limited to 'debian/knot.postrm')
-rw-r--r--debian/knot.postrm18
1 files changed, 18 insertions, 0 deletions
diff --git a/debian/knot.postrm b/debian/knot.postrm
new file mode 100644
index 0000000..76dccba
--- /dev/null
+++ b/debian/knot.postrm
@@ -0,0 +1,18 @@
+#!/bin/sh
+set -e
+
+if test "$1" = "purge"; then
+ spool=/var/lib/knot
+ rm -rf $spool/timers $spool/keys $spool/journal
+ rmdir $spool 2>/dev/null || true
+
+ dpkg-statoverride --remove /var/lib/knot >/dev/null 2>/dev/null || true
+ dpkg-statoverride --remove /etc/knot/knot.conf >/dev/null 2>/dev/null || true
+ dpkg-statoverride --remove /etc/knot >/dev/null 2>/dev/null || true
+
+ deluser --quiet knot > /dev/null || true
+fi
+
+#DEBHELPER#
+
+exit 0