summaryrefslogtreecommitdiff
path: root/community/courier-authlib/courier-authlib.install
blob: 7b29f845fda58c47b981b8ea6e1b6177f88de954 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# arg 1:  the new package version
post_install() {
   # creates group and user on virgin systems
  if ! getent group courier >/dev/null; then
    groupadd -g 72 courier >/dev/null 2>&1
  fi

  if getent passwd courier >/dev/null; then
    useradd -u 72 -d /var/spool/courier -g courier -s /bin/false courier >/dev/null 2>&1
  fi

  systemd-tmpfiles --create /usr/lib/tmpfiles/courier-authlib.conf
}

# arg 1:  the new package version
# arg 2:  the old package version
post_upgrade() {
    post_install $1
}

# arg 1:  the old package version
pre_remove() {
  userdel courier
  groupdel courier
} >/dev/null 2>&1