File: //etc/init.d/dovecot.rpmsave
#!/bin/bash
#
# dovecot
#
# chkconfig: 2345 82 82
# description: dovecot
. /etc/rc.d/init.d/cpfunctions
USER=root
SERVICE=dovecot
PIDFILE=/var/run/dovecot/master.pid
REGEX='(?:^|\s+|\/)dovecot$'
start() {
already_running $USER $SERVICE $PIDFILE $REGEX; RUNNING=$?
if [ 0 = $RUNNING ]; then
/usr/sbin/dovecot >/dev/null 2>&1
fi
}
stop() {
/usr/local/cpanel/scripts/ckillall -TERM dovecot >/dev/null 2>&1
/usr/local/cpanel/scripts/ckillall -TERM dovecot >/dev/null 2>&1
/usr/local/cpanel/scripts/ckillall -9 dovecot >/dev/null 2>&1
/usr/local/cpanel/scripts/ckillall -9 dovecot-auth >/dev/null 2>&1
}
status() {
echo
}
case "$1" in
start)
start
;;
stop)
stop
;;
restart)
stop
start
;;
status)
status
;;
esac