summaryrefslogtreecommitdiffstats
path: root/debian/deluged.postrm
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-10 21:38:38 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-10 21:38:38 +0000
commit74be7d468396cc599219f8297ce64743c307a34a (patch)
tree6355a9ba7f5d8d666bae8c0968b8e1caa3571c38 /debian/deluged.postrm
parentAdding upstream version 2.1.2~dev0+20240219. (diff)
downloaddeluge-debian/2.1.2_dev0+20240219-1.tar.xz
deluge-debian/2.1.2_dev0+20240219-1.zip
Adding debian version 2.1.2~dev0+20240219-1.debian/2.1.2_dev0+20240219-1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rwxr-xr-xdebian/deluged.postrm42
1 files changed, 42 insertions, 0 deletions
diff --git a/debian/deluged.postrm b/debian/deluged.postrm
new file mode 100755
index 0000000..cca1ab9
--- /dev/null
+++ b/debian/deluged.postrm
@@ -0,0 +1,42 @@
+#!/bin/sh
+
+set -e
+
+DELUGE_USER="debian-deluged"
+DELUGE_GROUP="debian-deluged"
+
+Remove_overrides ()
+{
+ for FILENAME in "${@}"
+ do
+ if dpkg-statoverride --list "${FILENAME}" > /dev/null 2>&1
+ then
+ dpkg-statoverride --remove "${FILENAME}"
+ fi
+ done
+}
+
+case "${1}" in
+ purge)
+ rm -f /var/log/deluged/*
+ rm -rf /var/lib/deluged/config/*
+
+ Remove_overrides /var/log/deluged /var/lib/deluged /var/lib/deluged/config
+
+ userdel ${DELUGE_USER} > /dev/null 2>&1 || true
+ groupdel ${DELUGE_GROUP} > /dev/null 2>&1 || true
+ ;;
+
+ remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
+
+ ;;
+
+ *)
+ echo "postrm called with unknown argument \`${1}'" >&2
+ exit 1
+ ;;
+esac
+
+#DEBHELPER#
+
+exit 0