X-Git-Url: http://www.privoxy.org/gitweb/?p=privoxy.git;a=blobdiff_plain;f=debian%2Fpostinst;h=5bc965bc62434ada05d9eae64e5bc78e60aa00d8;hp=8f1028de0d976512ee45515e6a025bbea66f052b;hb=72081f829de368392d04076728f8c991178c0080;hpb=efdeb80407e5194d54fa4372efa6dc77ad31a63a diff --git a/debian/postinst b/debian/postinst index 8f1028de..5bc965bc 100644 --- a/debian/postinst +++ b/debian/postinst @@ -25,11 +25,15 @@ set -e case "$1" in configure) - if ! grep -q '^privoxy:' /etc/passwd + if ! adduser --quiet --system --home /etc/privoxy --no-create-home \ + --ingroup nogroup --disabled-password privoxy then - adduser --system --home /etc/privoxy --ingroup nogroup \ - --disabled-password privoxy >/dev/null - fi + # 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 chown -R privoxy.adm /var/log/privoxy chmod 750 /var/log/privoxy chown privoxy /etc/privoxy/*.action /etc/privoxy/trust