summaryrefslogtreecommitdiff
path: root/debian/bitz-server.postrm
diff options
context:
space:
mode:
Diffstat (limited to 'debian/bitz-server.postrm')
-rw-r--r--debian/bitz-server.postrm22
1 files changed, 22 insertions, 0 deletions
diff --git a/debian/bitz-server.postrm b/debian/bitz-server.postrm
new file mode 100644
index 0000000..f172740
--- /dev/null
+++ b/debian/bitz-server.postrm
@@ -0,0 +1,22 @@
+#!/bin/sh
+
+set -e
+
+if [ "$1" = purge ]; then
+#
+# purge systemd files
+# see ../../doc/why.txt
+#
+ rm -f /etc/systemd/system/bitz-server.service
+ rm -f /var/lib/systemd/deb-systemd-helper-enabled/bitz-server.service.dsh-also
+ rm -f /var/lib/systemd/deb-systemd-helper-masked/bitz-server.service
+ if [ -d /var/lib/systemd/deb-systemd-helper-enabled ]; then
+ rmdir --ignore-fail-on-non-empty /var/lib/systemd/deb-systemd-helper-enabled
+ fi
+ if [ -d /var/lib/systemd/deb-systemd-helper-masked ]; then
+ rmdir --ignore-fail-on-non-empty /var/lib/systemd/deb-systemd-helper-masked
+ fi
+ rm -f /etc/init/bitz-server.override
+fi
+
+#DEBHELPER#