5 # description: IMAP Daemon
7 # Source function library
8 . /etc/rc.d/init.d/functions
11 . /etc/sysconfig/network
14 [ -f /etc/sysconfig/dovecot ] && . /etc/sysconfig/dovecot
16 # Check that networking is up.
17 if is_yes "${NETWORKING}"; then
18 if [ ! -f /var/lock/subsys/network -a "$1" != stop -a "$1" != status ]; then
19 msg_network_down "Dovecot"
27 # Check if the service is already running?
28 if [ ! -f /var/lock/subsys/dovecot ]; then
29 msg_starting "Dovecot"
30 daemon /usr/sbin/dovecot
32 [ $RETVAL -eq 0 ] && touch /var/lock/subsys/dovecot
34 msg_already_running "Dovecot"
39 if [ -f /var/lock/subsys/dovecot ]; then
40 msg_stopping "Dovecot"
41 killproc --pidfile dovecot/master.pid dovecot
42 rm -f /var/lock/subsys/dovecot
44 msg_not_running "Dovecot"
49 if [ -f /var/lock/subsys/dovecot ]; then
51 killproc --pidfile dovecot/master.pid docevot -HUP
54 msg_not_running "Dovecot"
60 if [ -f /var/lock/subsys/dovecot ]; then
64 msg_not_running "Dovecot"
70 # See how we were called.
93 msg_usage "$0 {start|stop|restart|try-restart|reload|force-reload|status}"