commit 16f59963a7385fadc295382c9ed2948c7716df05 parent f141c11cd5ede6254ab9db028a05be0a24407db3 Author: Christian Grothoff <grothoff@gnunet.org> Date: Thu, 14 Aug 2025 15:31:40 +0200 do not use variablenames for usernames/groupnames as suggested by Florian Diffstat:
| M | debian/anastasis-httpd.postinst | | | 6 | ++---- |
| M | debian/anastasis-httpd.postrm | | | 7 | +++---- |
2 files changed, 5 insertions(+), 8 deletions(-)
diff --git a/debian/anastasis-httpd.postinst b/debian/anastasis-httpd.postinst @@ -19,17 +19,15 @@ if [ "$1" = "purge" ]; then fi ANASTASIS_HOME="/var/lib/anastasis/" -_USERNAME=anastasis-httpd -_GROUPNAME=www-data . /usr/share/debconf/confmodule case "${1}" in configure) # Creating taler users if needed - if ! getent passwd ${_USERNAME} >/dev/null + if ! getent passwd anastasis-httpd >/dev/null then - adduser --quiet --system --ingroup ${_GROUPNAME} --no-create-home --home ${ANASTASIS_HOME} ${_USERNAME} + adduser --quiet --system --ingroup www-data --no-create-home --home ${ANASTASIS_HOME} anastasis-httpd fi if ! dpkg-statoverride --list /etc/anastasis/secrets/anastasis-db.secret.conf >/dev/null 2>&1 diff --git a/debian/anastasis-httpd.postrm b/debian/anastasis-httpd.postrm @@ -2,9 +2,8 @@ set -e -_USERNAME=anastasis-httpd - -if [ -f /usr/share/debconf/confmodule ]; then +if [ -f /usr/share/debconf/confmodule ]; +then . /usr/share/debconf/confmodule fi @@ -12,7 +11,7 @@ case "${1}" in purge) rm -rf /var/lib/anastasis/httpd/ rm -f /etc/anastasis/override.conf - deluser --system --quiet ${_USERNAME} || true + deluser --system --quiet anastasis-httpd || true dpkg-statoverride --remove \ /etc/anastasis/secrets/anastasis-db.secret.conf || true ;;