X-Git-Url: http://www.privoxy.org/gitweb/?a=blobdiff_plain;f=debian%2Fpostinst;h=4f9a0e008c8f9fc50ec3d53333b7583bc16e86a9;hb=9ef142653b0e898d489fbd701c0f0a4b2e8b8273;hp=5bc965bc62434ada05d9eae64e5bc78e60aa00d8;hpb=72081f829de368392d04076728f8c991178c0080;p=privoxy.git diff --git a/debian/postinst b/debian/postinst index 5bc965bc..4f9a0e00 100644 --- a/debian/postinst +++ b/debian/postinst @@ -25,18 +25,20 @@ set -e case "$1" in configure) - if ! adduser --quiet --system --home /etc/privoxy --no-create-home \ - --ingroup nogroup --disabled-password privoxy - then - # user privoxy seems to exist - # -> remove him before newly adding him. - deluser --quiet privoxy - adduser --quiet --system --home /etc/privoxy --no-create-home \ - --ingroup nogroup --disabled-password privoxy - fi + adduser --quiet --system --home /etc/privoxy --no-create-home \ + --ingroup nogroup --disabled-password privoxy chown -R privoxy.adm /var/log/privoxy chmod 750 /var/log/privoxy - chown privoxy /etc/privoxy/*.action /etc/privoxy/trust + chown privoxy /etc/privoxy/user.action /etc/privoxy/trust + [ -f /etc/privoxy/global.action ] \ + && chown privoxy /etc/privoxy/global.action + + if [ "x$2" != "x" ] && dpkg --compare-versions "$2" lt "3.0.4" + then + # Upgrading from a 3.0.3* version + chown root /etc/privoxy/standard.action \ + /etc/privoxy/default.action + fi ;; abort-upgrade|abort-remove|abort-deconfigure)