summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2023-09-09 15:03:25 +0200
committerChristian Grothoff <christian@grothoff.org>2023-09-09 15:03:25 +0200
commit6748cd080de49a51923a31ba15c8c67eadf5122f (patch)
tree45027245ab3a7323ee12d1cd62bf78bb8899a9f2
parent06daed3627e6637fa69df117944fe13bddedab93 (diff)
downloadmerchant-6748cd080de49a51923a31ba15c8c67eadf5122f.tar.gz
merchant-6748cd080de49a51923a31ba15c8c67eadf5122f.tar.bz2
merchant-6748cd080de49a51923a31ba15c8c67eadf5122f.zip
improve Debian package
-rw-r--r--debian/taler-merchant.postinst8
-rw-r--r--debian/taler-merchant.postrm29
2 files changed, 32 insertions, 5 deletions
diff --git a/debian/taler-merchant.postinst b/debian/taler-merchant.postinst
index 73c272bb..8f39eaf8 100644
--- a/debian/taler-merchant.postinst
+++ b/debian/taler-merchant.postinst
@@ -32,11 +32,9 @@ configure)
adduser --quiet --system --ingroup ${_GROUPNAME} --no-create-home --home ${TALER_HOME} ${_USERNAME}
fi
- if ! dpkg-statoverride --list /etc/taler/secrets/merchant-db.secret.conf >/dev/null 2>&1; then
- dpkg-statoverride --add --update \
- taler-merchant-httpd root 460 \
- /etc/taler/secrets/merchant-db.secret.conf
- fi
+ dpkg-statoverride --add --update \
+ taler-merchant-httpd root 460 \
+ /etc/taler/secrets/merchant-db.secret.conf
;;
diff --git a/debian/taler-merchant.postrm b/debian/taler-merchant.postrm
new file mode 100644
index 00000000..693460ef
--- /dev/null
+++ b/debian/taler-merchant.postrm
@@ -0,0 +1,29 @@
+#!/bin/sh
+
+set -e
+
+_USERNAME=taler-merchant-httpd
+
+
+if [ -f /usr/share/debconf/confmodule ]; then
+ . /usr/share/debconf/confmodule
+fi
+
+case "${1}" in
+purge)
+ dpkg-statoverride --remove \
+ /etc/taler/secrets/merchant-db.secret.conf || true
+ deluser --quiet --system ${_USERNAME} || true
+ ;;
+
+remove | upgrade | failed-upgrade | abort-install | abort-upgrade | disappear)
+ ;;
+*)
+ echo "postrm called with unknown argument \`${1}'" >&2
+ exit 1
+ ;;
+esac
+
+#DEBHELPER#
+
+exit 0