[ -f /etc/sysconfig/authdaemon ] && . /etc/sysconfig/authdaemon
# Check that networking is up.
-if is_no "${NETWORKING}" ; then
- msg_network_down "Courier IMAP - Authdaemon"
- exit 1
+if is_yes "${NETWORKING}"; then
+ if [ ! -f /var/lock/subsys/network ]; then
+ msg_network_down "Courier IMAP - Authdaemon"
+ exit 1
+ fi
+else
+ exit 0
fi
# See how we were called.
if [ ! -f /var/lock/subsys/authdaemon ]; then
msg_starting "Courier IMAP - Authdaemon"
daemon /usr/lib/courier-imap/authlib/authdaemond.$METHOD start
- RETVAL=$?
- [ $RETVAL -eq 0 ] && touch /var/lock/subsys/authdaemon
+ RETVAL=$?
+ [ $RETVAL -eq 0 ] && touch /var/lock/subsys/authdaemon
else
msg_already_running "Courier IMAP - Authdaemon"
exit 1
restart|reload)
# restart related services, if running..
if [ -f /var/lock/subsys/courier-mta -a \
- -x /etc/rc.d/init.d/courier-mta ]; then
- /etc/rc.d/init.d/courier-mta stop
- crun=1
+ -x /etc/rc.d/init.d/courier-mta ]; then
+ /etc/rc.d/init.d/courier-mta stop
+ crun=1
fi
if [ -f /var/lock/subsys/courier-imap -a \
- -x /etc/rc.d/init.d/courier-imap ]; then
- /etc/rc.d/init.d/courier-imap stop
- imaprun=1
+ -x /etc/rc.d/init.d/courier-imap ]; then
+ /etc/rc.d/init.d/courier-imap stop
+ imaprun=1
fi
if [ -f /var/lock/subsys/courier-pop3 -a \
- -x /etc/rc.d/init.d/courier-pop3 ]; then
- /etc/rc.d/init.d/courier-pop3 stop
- poprun=1
+ -x /etc/rc.d/init.d/courier-pop3 ]; then
+ /etc/rc.d/init.d/courier-pop3 stop
+ poprun=1
fi
$0 stop
$0 start
[ -f /etc/sysconfig/courier-pop3 ] && . /etc/sysconfig/courier-pop3
# Check that networking is up.
-if is_no "${NETWORKING}" ; then
- msg_network_down "Courier POP3"
- exit 1
+if is_yes "${NETWORKING}"; then
+ if [ ! -f /var/lock/subsys/network ]; then
+ msg_network_down "Courier POP3"
+ exit 1
+ fi
+else
+ exit 0
fi
# See how we were called.
if [ ! -f /var/lock/subsys/courier-pop3 ]; then
# start authdaemon, if not running..
if [ ! -f /var/lock/subsys/authdaemon -a \
- -x /etc/rc.d/init.d/authdaemon ]; then
- /etc/rc.d/init.d/authdaemon start
- RETVAL=$?
- if [ $RETVAL -ne 0 ]; then
- msg_starting "Courier POP3"
- fail
- exit 1
- fi
+ -x /etc/rc.d/init.d/authdaemon ]; then
+ /etc/rc.d/init.d/authdaemon start
+ RETVAL=$?
+ if [ $RETVAL -ne 0 ]; then
+ msg_starting "Courier POP3"
+ fail
+ exit 1
+ fi
fi
msg_starting "Courier POP3"
/usr/bin/env - /bin/sh -c " . /etc/sysconfig/courier-pop3 ; \
[ -f /etc/sysconfig/courier-imap ] && . /etc/sysconfig/courier-imap
# Check that networking is up.
-if is_no "${NETWORKING}" ; then
- msg_network_down "Courier IMAP"
- exit 1
+if is_yes "${NETWORKING}"; then
+ if [ ! -f /var/lock/subsys/network ]; then
+ msg_network_down "Courier IMAP"
+ exit 1
+ fi
+else
+ exit 0
fi
# See how we were called.
if [ ! -f /var/lock/subsys/courier-imap ]; then
# start authdaemon, if not running..
if [ ! -f /var/lock/subsys/authdaemon -a \
- -x /etc/rc.d/init.d/authdaemon ]; then
- /etc/rc.d/init.d/authdaemon start
- RETVAL=$?
- if [ $RETVAL -ne 0 ]; then
- msg_starting "Courier IMAP"
- fail
- exit 1
- fi
+ -x /etc/rc.d/init.d/authdaemon ]; then
+ /etc/rc.d/init.d/authdaemon start
+ RETVAL=$?
+ if [ $RETVAL -ne 0 ]; then
+ msg_starting "Courier IMAP"
+ fail
+ exit 1
+ fi
fi
msg_starting "Courier IMAP"
ulimit -d $IMAP_ULIMITD