taler-auditor.postinst (1740B)
1 #!/bin/sh 2 3 set -e 4 5 case "${1}" in 6 configure) 7 if ! getent group taler-auditor-httpd >/dev/null; 8 then 9 addgroup --quiet --system taler-auditor-httpd 10 fi 11 if ! getent passwd taler-auditor-httpd >/dev/null; 12 then 13 adduser --quiet \ 14 --system \ 15 --ingroup taler-auditor-httpd \ 16 --no-create-home \ 17 --home /var/lib/taler-auditor \ 18 taler-auditor-httpd 19 fi 20 21 if ! dpkg-statoverride --list /etc/taler-auditor/secrets/auditor-db.secret.conf >/dev/null 2>&1; 22 then 23 dpkg-statoverride --add \ 24 --update \ 25 taler-auditor-httpd taler-auditor-httpd \ 26 640 \ 27 /etc/taler-auditor/secrets/auditor-db.secret.conf 28 fi 29 if ! dpkg-statoverride --list /etc/taler-auditor/secrets/exchange-accountcredentials-1.secret.conf >/dev/null 2>&1; 30 then 31 dpkg-statoverride --add \ 32 --update \ 33 taler-auditor-httpd taler-auditor-httpd \ 34 640 \ 35 /etc/taler-auditor/secrets/exchange-accountcredentials-1.secret.conf 36 fi 37 38 # Try to generate compressed versions of the SPA 39 for n in index.css index.js index.html 40 do 41 TDIR="/usr/share/taler-auditor/" 42 gzip --best - < "${TDIR}/spa/$n" > "${TDIR}/spa/$n.gz" || true 43 zstd -19 - < "${TDIR}/spa/$n" > "${TDIR}/spa/$n.zstd" || true 44 done 45 ;; 46 47 abort-upgrade | abort-remove | abort-deconfigure) ;; 48 *) 49 echo "postinst called with unknown argument \`${1}'" >&2 50 exit 1 51 ;; 52 esac 53 54 # Scripts generated by dh_installdeb are inserted below 55 56 #DEBHELPER# 57 58 exit 0