3 # cyrus-imapd cyrus-imapd IMAP & POP3 Server
7 # description: cyrus-imapd
9 # Source function library
10 . /etc/rc.d/init.d/functions
13 . /etc/sysconfig/network
15 # Check that networking is up.
16 if is_yes "${NETWORKING}"; then
17 if [ ! -f /var/lock/subsys/network -a "$1" != stop -a "$1" != status ]; then
18 msg_network_down cyrus-imapd
26 # Check if the service is already running?
27 if [ ! -f /var/lock/subsys/cyrus-imapd ]; then
28 msg_starting cyrus-imapd
29 /usr/lib/cyrus/cyrus-master &
30 if ps -C cyrus-master >/dev/null 2>&1; then
32 [ $RETVAL -eq 0 ] && touch /var/lock/subsys/cyrus-imapd
38 msg_already_running cyrus-imapd
44 if [ -f /var/lock/subsys/cyrus-imapd ]; then
45 msg_stopping cyrus-imapd
47 rm -f /var/lock/subsys/cyrus-imapd
49 msg_not_running cyrus-imapd
54 # See how we were called.
71 msg_usage "$0 {start|stop|restart|force-reload|status}"