paivana-httpd.postinst (1025B)
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 'paivana-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 'paivana-httpd.service' >/dev/null || true 17 deb-systemd-helper unmask 'paivana-httpd.service' >/dev/null || true 18 fi 19 fi 20 21 PAIVANA_HOME="/var/lib/paivana/" 22 23 . /usr/share/debconf/confmodule 24 25 case "${1}" in 26 configure) 27 # Creating taler users if needed 28 if ! getent passwd paivana-httpd >/dev/null; 29 then 30 adduser --quiet --system --ingroup www-data --no-create-home --home ${PAIVANA_HOME} paivana-httpd 31 fi 32 33 ;; 34 35 abort-upgrade | abort-remove | abort-deconfigure) ;; 36 37 *) 38 echo "postinst called with unknown argument \`${1}'" >&2 39 exit 1 40 ;; 41 esac 42 43 #DEBHELPER# 44 45 exit 0