PREUN
/bin/sh
if [ $1 = 0 ]; then service courier-imap stop > /dev/null 2>/dev/null || :; /sbin/chkconfig --del courier-imap; fi;
for file in /usr/lib/{imap,pop3d}{,-ssl}.rc ; do
[ -x ${file} ] && ${file} stop
done
POSTIN
/bin/sh
/usr/share/sysconftool `cat /usr/share/configlist` >/dev/null
if [ $1 = 1 ]; then /sbin/chkconfig --add courier-imap; else if [ -f /var/lock/subsys/courier-imap ]; then service courier-imap restart > /dev/null 2>/dev/null || : ; fi; fi;
# Create the %ghost files
n=imap
for f in /var/run/${n}d{,-ssl}.pid{,.lock}; do
if [ ! -f $f ]; then
touch $f
chown root.root $f
chmod 0600 $f
fi
done
$dir="/var/run/authdaemon.courier-imap"
mkdir -p "${dir}"
if [ ! -f ${dir}/lock ]; then
touch ${dir}/lock
chown root.root ${dir}/lock
chmod 0600 ${dir}/lock
fi
if [ ! -f ${dir}/pid ]; then
touch ${dir}/pid
chown root.root ${dir}/pid
chmod 0644 ${dir}/pid
fi
if [ ! -f ${dir}/socket ]; then
touch ${dir}/socket
chown root.root ${dir}/socket
chmod 0777 ${dir}/socket
fi
echo "--------------------------------------------------------------------------------"
echo "IMPORTANT NOTE: "
echo "Be SURE to have a Maildir directory in the users home directory "
echo "containing a Maildir spool, or else you cannot login! "
echo "--------------------------------------------------------------------------------"
Triggers
courier-imap
/bin/sh
test ! -f /usr/share/configlist || /usr/share/sysconftool-rpmupgrade `cat /usr/share/configlist` >/dev/null