PKGBUILDs/extra/dovecot/dovecot.install

27 lines
531 B
Text
Raw Normal View History

2009-10-10 02:23:22 +00:00
# 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 $*