summaryrefslogtreecommitdiff
path: root/community/privoxy/privoxy.install
blob: c3ed75111811f71ec085f668e5bfaaabe6786435 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
post_install() {
  groupadd -g 42 privoxy &>/dev/null
  useradd -u 42 -g privoxy -d /var/spool/privoxy -s /bin/false privoxy &>/dev/null
  chown -R privoxy:privoxy /etc/privoxy /var/log/privoxy

  if [ ! -d /var/spool/privoxy ]; then
    install -dm0770 -o privoxy -g privoxy /var/spool/privoxy
  fi
}

post_upgrade() {
  post_install $1
}

pre_remove() {
  userdel privoxy &>/dev/null
  groupdel privoxy &>/dev/null
  rm -rf var/spool/privoxy
}