diff options
author | Christian Grothoff <christian@grothoff.org> | 2023-09-09 15:05:23 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2023-09-09 15:05:23 +0200 |
commit | d47e8423303a50d1ffaaa2a494f70b99d4c8da55 (patch) | |
tree | 7a4f596cde3b4da70ba551544c3ffbce502e3306 /debian | |
parent | 52a09e2f719c023c8c728bdf6bd1e7a8b7fe051b (diff) | |
download | sync-d47e8423303a50d1ffaaa2a494f70b99d4c8da55.tar.gz sync-d47e8423303a50d1ffaaa2a494f70b99d4c8da55.tar.bz2 sync-d47e8423303a50d1ffaaa2a494f70b99d4c8da55.zip |
improve Debian package
Diffstat (limited to 'debian')
-rw-r--r-- | debian/sync-httpd.postinst | 8 | ||||
-rw-r--r-- | debian/sync-httpd.postrm | 4 |
2 files changed, 7 insertions, 5 deletions
diff --git a/debian/sync-httpd.postinst b/debian/sync-httpd.postinst index 4c80646..ee402a1 100644 --- a/debian/sync-httpd.postinst +++ b/debian/sync-httpd.postinst @@ -31,11 +31,9 @@ configure) adduser --quiet --system --ingroup ${_GROUPNAME} --no-create-home --home ${SYNC_HOME} ${_USERNAME} fi - if ! dpkg-statoverride --list /etc/sync/secrets/sync-db.secret.conf >/dev/null 2>&1; then - dpkg-statoverride --add --update \ - sync-httpd root 460 \ - /etc/sync/secrets/sync-db.secret.conf - fi + dpkg-statoverride --add --update \ + sync-httpd root 640 \ + /etc/sync/secrets/sync-db.secret.conf ;; diff --git a/debian/sync-httpd.postrm b/debian/sync-httpd.postrm index 31cd456..60aa9a5 100644 --- a/debian/sync-httpd.postrm +++ b/debian/sync-httpd.postrm @@ -6,10 +6,14 @@ if [ -f /usr/share/debconf/confmodule ]; then . /usr/share/debconf/confmodule fi +_USERNAME=sync-httpd + case "${1}" in purge) rm -rf /var/lib/sync/httpd/ rm -f /etc/sync/override.conf + dpkg-statoverride --remove /etc/sync/secrets/sync-db.secret.conf + deluser --system --quiet ${_USERNAME} || true ;; remove | upgrade | failed-upgrade | abort-install | abort-upgrade | disappear) ;; |