aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBertrand Marc <beberking@gmail.com>2012-05-05 18:18:20 +0200
committerBertrand Marc <beberking@gmail.com>2012-05-05 19:18:27 +0200
commit2743b2494e7f1dbf3640d9ec02fa8babd6ca0e5c (patch)
tree3f196c3895c5b802539f9b2bd6f304af7998b88a
parent81f5c6f157d366be33aef2f1663c383415a5afc6 (diff)
Use debconf in postrm to determine which user and group to delete
-rw-r--r--debian/gnunet-server.postrm17
1 files changed, 15 insertions, 2 deletions
diff --git a/debian/gnunet-server.postrm b/debian/gnunet-server.postrm
index aab17fd..5125de1 100644
--- a/debian/gnunet-server.postrm
+++ b/debian/gnunet-server.postrm
@@ -4,8 +4,21 @@ set -e
case "${1}" in
purge)
- _USERNAME="gnunet"
- _GROUPNAME="gnunet"
+ if [ -e /usr/share/debconf/confmodule ]
+ then
+ . /usr/share/debconf/confmodule
+ db_version 2.0
+
+ db_get gnunet-server/username
+ _USERNAME="${RET:-gnunet}"
+
+ db_get gnunet-server/groupname
+ _GROUPNAME="${RET:-gnunet}"
+ else
+ _USERNAME="gnunet"
+ _GROUPNAME="gnunet"
+ fi
+
GNUNETDNS_GROUP="gnunetdns"
for i in /usr/bin/gnunet-helper-exit \