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 # See how we were called.
30 # Check if the service is already running?
31 if [ ! -f /var/lock/subsys/dovecot ]; then
32 msg_starting "Dovecot"
33 daemon /usr/sbin/dovecot
35 [ $RETVAL -eq 0 ] && touch /var/lock/subsys/dovecot
37 msg_already_running "Dovecot"
42 if [ -f /var/lock/subsys/dovecot ]; then
43 msg_stopping "Dovecot"
45 rm -f /var/lock/subsys/dovecot
47 msg_not_running "Dovecot"
60 msg_usage "$0 {start|stop|restart|force-reload|status}"