summaryrefslogtreecommitdiff
path: root/pcr/sphinx/sphinx.install
blob: 60001f6c9b721be0c068f127d868bbe633db3d36 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
post_install() {
  groupadd sphinx &>/dev/null
  useradd -g sphinx -d /var/lib/sphinx -s /bin/false sphinx &>/dev/null
  chown -R sphinx:sphinx /var/lib/sphinx
}

post_upgrade(){
  getent group sphinx >/dev/null 2>&1 || groupadd sphinx &>/dev/null
  getent passwd sphinx >/dev/null 2>&1 || useradd -g sphinx -d /var/lib/sphinx \
    -s /bin/false sphinx &>/dev/null
}

## arg 1:  the old package version
post_remove() {
  userdel sphinx
  groupdel sphinx
}