use statoverride conditionally

This commit is contained in:
Florian Dold 2021-07-29 15:27:54 +02:00
parent 49645317c3
commit 973f364ae3
No known key found for this signature in database
GPG Key ID: D2E4F00F29D02A4B
2 changed files with 16 additions and 3 deletions

View File

@ -24,7 +24,11 @@ configure)
echo " done."
fi
dpkg-statoverride --add --update ${_USERNAME} ${_GROUPNAME} 660 /etc/taler/secrets/auditor-db.secret.conf
if ! dpkg-statoverride --list /etc/taler/secrets/auditor-db.secret.conf >/dev/null 2>&1; then
dpkg-statoverride --add --update \
${_USERNAME} ${_GROUPNAME} 660 \
/etc/taler/secrets/auditor-db.secret.conf
fi
;;

View File

@ -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
;;