summaryrefslogtreecommitdiffstats
path: root/distro/deb/knot.postrm
diff options
context:
space:
mode:
Diffstat (limited to 'distro/deb/knot.postrm')
-rw-r--r--distro/deb/knot.postrm18
1 files changed, 18 insertions, 0 deletions
diff --git a/distro/deb/knot.postrm b/distro/deb/knot.postrm
new file mode 100644
index 0000000..76dccba
--- /dev/null
+++ b/distro/deb/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