summaryrefslogtreecommitdiff
path: root/community/squid/squid.install
blob: 5c8b77600a07dc79d451668c33cd9d83732f4d5e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
post_install() {
  [ -z "$(grep ^proxy: /etc/group)" ] && groupadd -g 15 proxy &>/dev/null
  id proxy &>/dev/null || useradd -u 15 -g proxy -d /var/empty proxy
  chown proxy.proxy var/{cache,log}/squid
  systemd-tmpfiles --create squid.conf
}

post_upgrade() {
  post_install $1
}

pre_remove() {
  userdel proxy &> /dev/null
  [ ! -z "$(grep ^proxy: /etc/group)" ] && groupdel proxy &>/dev/null
}