diff options
author | Christian Grothoff <christian@grothoff.org> | 2022-06-20 23:31:04 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2022-06-20 23:31:04 +0200 |
commit | e9e568139d08cfd101e6559a55e50d57dedb2889 (patch) | |
tree | c86438ebbf4e21917fa9c335987f9c1fde8171be /debian/anastasis-httpd.postinst | |
parent | aecfe6973db3cf5c9ff2be0aa164eabfa50a60bb (diff) | |
download | anastasis-e9e568139d08cfd101e6559a55e50d57dedb2889.tar.gz anastasis-e9e568139d08cfd101e6559a55e50d57dedb2889.tar.bz2 anastasis-e9e568139d08cfd101e6559a55e50d57dedb2889.zip |
-fix anastasis Debian package
Diffstat (limited to 'debian/anastasis-httpd.postinst')
-rw-r--r-- | debian/anastasis-httpd.postinst | 20 |
1 files changed, 18 insertions, 2 deletions
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 |