diff options
author | Christian Grothoff <christian@grothoff.org> | 2023-09-09 15:03:13 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2023-09-09 15:03:13 +0200 |
commit | 5f17d63c4cc7721a752c48170a66cb076040e1e0 (patch) | |
tree | 7431857d39a7e54885a60e50c7ee6ee9bfdb1d15 /debian | |
parent | 7fa0e74f08659197a1f25af6ba00bff862c2a2c2 (diff) |
improve Debian package
Diffstat (limited to 'debian')
-rw-r--r-- | debian/taler-auditor.postinst | 2 | ||||
-rw-r--r-- | debian/taler-auditor.postrm | 9 | ||||
-rw-r--r-- | debian/taler-exchange.postinst | 4 | ||||
-rw-r--r-- | debian/taler-exchange.postrm | 24 |
4 files changed, 35 insertions, 4 deletions
diff --git a/debian/taler-auditor.postinst b/debian/taler-auditor.postinst index 4e89be226..d65fd8c5d 100644 --- a/debian/taler-auditor.postinst +++ b/debian/taler-auditor.postinst @@ -22,7 +22,7 @@ configure) if ! dpkg-statoverride --list /etc/taler/secrets/auditor-db.secret.conf >/dev/null 2>&1; then dpkg-statoverride --add --update \ - ${_USERNAME} ${_GROUPNAME} 660 \ + ${_USERNAME} ${_GROUPNAME} 640 \ /etc/taler/secrets/auditor-db.secret.conf fi diff --git a/debian/taler-auditor.postrm b/debian/taler-auditor.postrm index 752510e63..639e3241e 100644 --- a/debian/taler-auditor.postrm +++ b/debian/taler-auditor.postrm @@ -6,9 +6,16 @@ if [ -f /usr/share/debconf/confmodule ]; then . /usr/share/debconf/confmodule fi +_USERNAME=taler-auditor-httpd +_GROUPNAME=taler-auditor-httpd + case "${1}" in purge) - ;; + dpkg-statoverride --remove \ + /etc/taler/secrets/auditor-db.secret.conf || true + deluser --system --quiet ${_USERNAME} || true + delgroup --only-if-empty --quiet ${_GROUPNAME} || true + ;; remove | upgrade | failed-upgrade | abort-install | abort-upgrade | disappear) ;; *) diff --git a/debian/taler-exchange.postinst b/debian/taler-exchange.postinst index 892e48475..6278dac1f 100644 --- a/debian/taler-exchange.postinst +++ b/debian/taler-exchange.postinst @@ -56,13 +56,13 @@ configure) if ! dpkg-statoverride --list /etc/taler/secrets/exchange-accountcredentials-1.secret.conf >/dev/null 2>&1; then dpkg-statoverride --add --update \ - ${_WIREUSERNAME} root 460 \ + ${_WIREUSERNAME} root 640 \ /etc/taler/secrets/exchange-accountcredentials-1.secret.conf fi if ! dpkg-statoverride --list /etc/taler/secrets/exchange-db.secret.conf >/dev/null 2>&1; then dpkg-statoverride --add --update \ - root ${_DBGROUPNAME} 660 \ + root ${_DBGROUPNAME} 640 \ /etc/taler/secrets/exchange-db.secret.conf fi diff --git a/debian/taler-exchange.postrm b/debian/taler-exchange.postrm index 6488d268b..9edf548a5 100644 --- a/debian/taler-exchange.postrm +++ b/debian/taler-exchange.postrm @@ -2,6 +2,17 @@ set -e +_GROUPNAME=taler-exchange-secmod +_DBGROUPNAME=taler-exchange-db +_EUSERNAME=taler-exchange-httpd +_CLOSERUSERNAME=taler-exchange-closer +_CSECUSERNAME=taler-exchange-secmod-cs +_RSECUSERNAME=taler-exchange-secmod-rsa +_ESECUSERNAME=taler-exchange-secmod-eddsa +_AGGRUSERNAME=taler-exchange-aggregator +_WIREUSERNAME=taler-exchange-wire + + if [ -f /usr/share/debconf/confmodule ]; then . /usr/share/debconf/confmodule fi @@ -9,6 +20,19 @@ fi case "${1}" in purge) rm -rf /var/lib/taler/exchange-offline /var/lib/taler/exchange-secmod-* + dpkg-statoverride --remove \ + /etc/taler/secrets/exchange-accountcredentials-1.secret.conf || true + dpkg-statoverride --remove \ + /etc/taler/secrets/exchange-db.secret.conf || true + deluser --quiet --system ${_CSECUSERNAME} || true + deluser --quiet --system ${_RSECUSERNAME} || true + deluser --quiet --system ${_ESECUSERNAME} || true + deluser --quiet --system ${_AGGRUSERNAME} || true + deluser --quiet --system ${_WIREUSERNAME} || true + deluser --quiet --system ${_CLOSERUSERNAME} || true + deluser --quiet --system ${_EUSERNAME} || true + delgroup --only-if-empty --quiet ${_DBGROUPNAME} || true + delgroup --only-if-empty --quiet ${_GROUPNAME} || true ;; remove | upgrade | failed-upgrade | abort-install | abort-upgrade | disappear) |