summaryrefslogtreecommitdiff
path: root/debian/bigcouch.postrm
diff options
context:
space:
mode:
Diffstat (limited to 'debian/bigcouch.postrm')
-rw-r--r--debian/bigcouch.postrm24
1 files changed, 24 insertions, 0 deletions
diff --git a/debian/bigcouch.postrm b/debian/bigcouch.postrm
new file mode 100644
index 00000000..7b0e651a
--- /dev/null
+++ b/debian/bigcouch.postrm
@@ -0,0 +1,24 @@
+#!/bin/sh -e
+
+case $1 in
+ purge)
+ if test -d "/etc/sv/bigcouch"; then
+ rm -r -f "/etc/sv/bigcouch"
+ fi
+ if test -d "/opt/bigcouch"; then
+ rm -r -f "/opt/bigcouch"
+ fi
+ if getent passwd bigcouch > /dev/null && which deluser > /dev/null; then
+ for PID in `ps --no-headers -u bigcouch -opid`
+ do
+ kill $PID
+ done
+ deluser bigcouch
+ fi
+ if getent group bigcouch > /dev/null && which delgroup > /dev/null; then
+ delgroup bigcouch
+ fi
+ ;;
+esac
+
+#DEBHELPER#