summaryrefslogtreecommitdiffstats
path: root/dovecot/dovecot-managesieve.install
blob: 51757346cbd1de99d278113bfa9a3420fbfc694c (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() {
    if [ -z "`grep '^dovecot:' /etc/group`" ]; then
	groupadd -g 76 dovecot >& /dev/null
    fi
    if [ -z "`grep '^dovecot:' /etc/passwd`" ]; then
	useradd -u 76 -d /var/run/dovecot/login -g dovecot -s /bin/false dovecot
    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 dovecot &> /dev/null
    groupdel dovecot &> /dev/null
}

op=$1
shift

$op $*