anastasis-httpd.postinst (1271B)
1 #!/bin/bash 2 3 set -e 4 5 if [ -d /run/systemd/system ]; then 6 systemctl --system daemon-reload >/dev/null || true 7 fi 8 if [ "$1" = "remove" ]; then 9 if [ -x "/usr/bin/deb-systemd-helper" ]; then 10 deb-systemd-helper mask 'anastasis-httpd.service' >/dev/null || true 11 fi 12 fi 13 14 if [ "$1" = "purge" ]; then 15 if [ -x "/usr/bin/deb-systemd-helper" ]; then 16 deb-systemd-helper purge 'anastasis-httpd.service' >/dev/null || true 17 deb-systemd-helper unmask 'anastasis-httpd.service' >/dev/null || true 18 fi 19 fi 20 21 ANASTASIS_HOME="/var/lib/anastasis/" 22 23 . /usr/share/debconf/confmodule 24 25 case "${1}" in 26 configure) 27 # Creating taler users if needed 28 if ! getent passwd anastasis-httpd >/dev/null 29 then 30 adduser --quiet --system --ingroup www-data --no-create-home --home ${ANASTASIS_HOME} anastasis-httpd 31 fi 32 33 if ! dpkg-statoverride --list /etc/anastasis/secrets/anastasis-db.secret.conf >/dev/null 2>&1 34 then 35 dpkg-statoverride --add --update \ 36 anastasis-httpd root 460 \ 37 /etc/anastasis/secrets/anastasis-db.secret.conf 38 fi 39 40 ;; 41 42 abort-upgrade | abort-remove | abort-deconfigure) ;; 43 44 *) 45 echo "postinst called with unknown argument \`${1}'" >&2 46 exit 1 47 ;; 48 esac 49 50 #DEBHELPER# 51 52 exit 0