summaryrefslogtreecommitdiff
path: root/community/courier-authlib/courier-authlib.install
blob: cbccc636b9a9f226539dfd765951d192f0d651c1 (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
27
28
29
30
31
32
# arg 1:  the new package version
post_install() {
   # creates group and user on virgin systems
  if [ -z "`grep '^courier::' /etc/group`" ]; then
    groupadd -g 72 courier >& /dev/null
  fi
  if [ -z "`grep '^courier:' /etc/passwd`" ]; then
    useradd -u 72 -d /var/spool/courier -g courier -s /bin/false courier &>/dev/null
  fi
}

# 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 &> /dev/null
    groupdel courier &> /dev/null
}


post_remove() {
 /bin/true
}

op=$1
shift

$op $*