From e9e568139d08cfd101e6559a55e50d57dedb2889 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Mon, 20 Jun 2022 23:31:04 +0200 Subject: -fix anastasis Debian package --- debian/anastasis-httpd.postinst | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) (limited to 'debian/anastasis-httpd.postinst') diff --git a/debian/anastasis-httpd.postinst b/debian/anastasis-httpd.postinst index 994b06b..428d228 100644 --- a/debian/anastasis-httpd.postinst +++ b/debian/anastasis-httpd.postinst @@ -2,7 +2,23 @@ set -e -TALER_HOME="/var/lib/taler/" +if [ -d /run/systemd/system ]; then + systemctl --system daemon-reload >/dev/null || true +fi +if [ "$1" = "remove" ]; then + if [ -x "/usr/bin/deb-systemd-helper" ]; then + deb-systemd-helper mask 'anastasis-httpd.service' >/dev/null || true + fi +fi + +if [ "$1" = "purge" ]; then + if [ -x "/usr/bin/deb-systemd-helper" ]; then + deb-systemd-helper purge 'anastasis-httpd.service' >/dev/null || true + deb-systemd-helper unmask 'anastasis-httpd.service' >/dev/null || true + fi +fi + +ANASTASIS_HOME="/var/lib/anastasis/" _USERNAME=anastasis-httpd _GROUPNAME=www-data @@ -17,7 +33,7 @@ case "${1}" in configure) # Creating taler users if needed if ! getent passwd ${_USERNAME} >/dev/null; then - adduser --quiet --system --ingroup ${_GROUPNAME} --no-create-home --home ${TALER_HOME} ${_USERNAME} + adduser --quiet --system --ingroup ${_GROUPNAME} --no-create-home --home ${ANASTASIS_HOME} ${_USERNAME} fi if ! dpkg-statoverride --list /etc/anastasis/secrets/anastasis-db.secret.conf >/dev/null 2>&1; then -- cgit v1.2.3