5 # description: IMAP Daemon
7 # Source function library
8 . /etc/rc.d/init.d/functions
11 . /etc/sysconfig/network
14 [ -f /etc/sysconfig/courier-imap ] && . /etc/sysconfig/courier-imap
16 # Check that networking is up.
17 if is_no "${NETWORKING}" ; then
22 # See how we were called.
25 # Check if the service is already running?
26 if [ ! -f /var/lock/subsys/courier-imap ]; then
31 for f in `echo $AUTHMODULES`; do
32 LIBAUTHMODULES="$LIBAUTHMODULES /usr/lib/courier-imap/$f"
35 /usr/lib/courier-imap/couriertcpd -address=$ADDRESS \
36 -maxprocs=$MAXDAEMONS -maxperip=$MAXPERIP \
37 -pid=/var/run/imapd.pid -stderrlogger=/usr/lib/courier-imap/logger \
38 -forcebind -nodnslookup -noidentlookup $PORT \
39 /usr/bin/imaplogin $LIBAUTHMODULES /usr/bin/imapd $MAILDIR &
41 if ps ax | grep -v grep | grep -q couriertcpd; then
42 touch /var/lock/subsys/courier-imap
48 msg_Already_Running IMAP
55 rm -f /var/run/imapd.pid
56 rm -f /var/lock/subsys/courier-imap
66 msg_Usage "$0 {start|stop|restart|reload|status}"