summaryrefslogtreecommitdiff
path: root/debian/postrm
diff options
context:
space:
mode:
Diffstat (limited to 'debian/postrm')
-rw-r--r--debian/postrm15
1 files changed, 15 insertions, 0 deletions
diff --git a/debian/postrm b/debian/postrm
new file mode 100644
index 0000000..29437f4
--- /dev/null
+++ b/debian/postrm
@@ -0,0 +1,15 @@
+#!/bin/sh
+# postrm script for rharchive
+
+set -e
+
+if [ "$1" = "purge" ] ; then
+ update-rc.d rharchive remove >/dev/null || exit $?
+
+ if [ -x "$(command -v deluser)" -a -x "$(command -v delgroup)" ]; then
+ deluser --quiet --system rharchive || true
+ delgroup --quiet --system rharchive || true
+ else
+ echo "Not removing rharchive user and group: adduser package not found." >&2
+ fi
+fi