Sophie

Sophie

distrib > Fedora > 14 > i386 > by-pkgid > 8a46c796d599422694381399201376aa > scriptlet

dovecot-2.0.1-1.fc14.i686.rpm

PREIN

/bin/sh
#dovecot uig and gid are reserved, see /usr/share/doc/setup-*/uidgid 
getent group dovecot >/dev/null || groupadd -r --gid 97 dovecot
getent passwd dovecot >/dev/null || \
useradd -r --uid 97 -g dovecot -d /usr/libexec/dovecot -s /sbin/nologin -c "Dovecot IMAP server" dovecot

getent group dovenull >/dev/null || groupadd -r dovenull
getent passwd dovenull >/dev/null || \
useradd -r -g dovenull -d /usr/libexec/dovecot -s /sbin/nologin -c "Dovecot's unauthorized user" dovenull
exit 0

PREUN

/bin/sh
if [ $1 = 0 ]; then
    /sbin/service dovecot stop > /dev/null 2>&1
    /sbin/chkconfig --del dovecot
fi

POSTIN

/bin/sh
/sbin/chkconfig --add dovecot
# generate the ssl certificates
if [ ! -f /etc/pki/dovecot/certs/dovecot.pem ]; then
    SSLDIR=/etc/pki/dovecot OPENSSLCONFIG=/etc/pki/dovecot/dovecot-openssl.cnf \
         /usr/libexec/dovecot/mkcert.sh &> /dev/null
fi

if ! test -f /var/run/dovecot/login/ssl-parameters.dat; then
    dovecot --build-ssl-parameters &>/dev/null
fi
exit 0

POSTUN

/bin/sh
if [ "$1" -ge "1" ]; then
    /sbin/service dovecot condrestart >/dev/null 2>&1 || :
fi