summaryrefslogtreecommitdiff
path: root/pcr/bitlbee-purple/bitlbee.install
blob: c8a8f93a1ba194fae26479f7f43385267d090b31 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
post_install() {
  if ! getent group bitlbee &>/dev/null; then
    groupadd -r -g 65 bitlbee >/dev/null
  fi
  if ! getent passwd bitlbee &>/dev/null; then
    useradd -r -u 65 -g bitlbee -d /var/lib/bitlbee -s /bin/false -c bitlbee bitlbee >/dev/null
  fi
  systemd-tmpfiles --create bitlbee.conf
}

post_upgrade() {
  post_install
}

post_remove() {
  if getent passwd bitlbee &>/dev/null; then
    userdel bitlbee >/dev/null
  fi
  if getent group bitlbee &>/dev/null; then
    groupdel bitlbee >/dev/null
  fi
}