aboutsummaryrefslogtreecommitdiff
path: root/debian/taler-exchange.postrm
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2023-09-09 15:03:13 +0200
committerChristian Grothoff <christian@grothoff.org>2023-09-09 15:03:13 +0200
commit5f17d63c4cc7721a752c48170a66cb076040e1e0 (patch)
tree7431857d39a7e54885a60e50c7ee6ee9bfdb1d15 /debian/taler-exchange.postrm
parent7fa0e74f08659197a1f25af6ba00bff862c2a2c2 (diff)
downloadexchange-5f17d63c4cc7721a752c48170a66cb076040e1e0.tar.xz
improve Debian package
Diffstat (limited to 'debian/taler-exchange.postrm')
-rw-r--r--debian/taler-exchange.postrm24
1 files changed, 24 insertions, 0 deletions
diff --git a/debian/taler-exchange.postrm b/debian/taler-exchange.postrm
index 6488d268b..9edf548a5 100644
--- a/debian/taler-exchange.postrm
+++ b/debian/taler-exchange.postrm
@@ -2,6 +2,17 @@
set -e
+_GROUPNAME=taler-exchange-secmod
+_DBGROUPNAME=taler-exchange-db
+_EUSERNAME=taler-exchange-httpd
+_CLOSERUSERNAME=taler-exchange-closer
+_CSECUSERNAME=taler-exchange-secmod-cs
+_RSECUSERNAME=taler-exchange-secmod-rsa
+_ESECUSERNAME=taler-exchange-secmod-eddsa
+_AGGRUSERNAME=taler-exchange-aggregator
+_WIREUSERNAME=taler-exchange-wire
+
+
if [ -f /usr/share/debconf/confmodule ]; then
. /usr/share/debconf/confmodule
fi
@@ -9,6 +20,19 @@ fi
case "${1}" in
purge)
rm -rf /var/lib/taler/exchange-offline /var/lib/taler/exchange-secmod-*
+ dpkg-statoverride --remove \
+ /etc/taler/secrets/exchange-accountcredentials-1.secret.conf || true
+ dpkg-statoverride --remove \
+ /etc/taler/secrets/exchange-db.secret.conf || true
+ deluser --quiet --system ${_CSECUSERNAME} || true
+ deluser --quiet --system ${_RSECUSERNAME} || true
+ deluser --quiet --system ${_ESECUSERNAME} || true
+ deluser --quiet --system ${_AGGRUSERNAME} || true
+ deluser --quiet --system ${_WIREUSERNAME} || true
+ deluser --quiet --system ${_CLOSERUSERNAME} || true
+ deluser --quiet --system ${_EUSERNAME} || true
+ delgroup --only-if-empty --quiet ${_DBGROUPNAME} || true
+ delgroup --only-if-empty --quiet ${_GROUPNAME} || true
;;
remove | upgrade | failed-upgrade | abort-install | abort-upgrade | disappear)