diff options
author | Florian Dold <florian@dold.me> | 2021-07-29 15:27:54 +0200 |
---|---|---|
committer | Florian Dold <florian@dold.me> | 2021-07-29 15:27:54 +0200 |
commit | 973f364ae31a009dd25054b666d215f6b8b2fb5a (patch) | |
tree | f38a0d4ab19028b17a9f860c3a258b2c8dd12e02 /debian/taler-exchange.postinst | |
parent | 49645317c3ec8ca784e2d200b2a0885ad721bdd9 (diff) |
use statoverride conditionally
Diffstat (limited to 'debian/taler-exchange.postinst')
-rw-r--r-- | debian/taler-exchange.postinst | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/debian/taler-exchange.postinst b/debian/taler-exchange.postinst index 353f7d6be..637ff8e09 100644 --- a/debian/taler-exchange.postinst +++ b/debian/taler-exchange.postinst @@ -50,8 +50,17 @@ configure) adduser --quiet ${_AGGRUSERNAME} ${_DBGROUPNAME} fi - dpkg-statoverride --add --update ${_WIREUSERNAME} root 460 /etc/taler/secrets/exchange-accounts.secret.conf - dpkg-statoverride --add --update root ${_DBGROUPNAME} 660 /etc/taler/secrets/exchange-db.secret.conf + if ! dpkg-statoverride --list /etc/taler/secrets/exchange-accounts.secret.conf >/dev/null 2>&1; then + dpkg-statoverride --add --update \ + ${_WIREUSERNAME} root 460 \ + /etc/taler/secrets/exchange-accounts.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 \ + /etc/taler/secrets/exchange-db.secret.conf + fi ;; |