exit 0
fi
+RETVAL=0
# See how we were called.
case "$1" in
start)
[ $RETVAL -eq 0 ] && touch /var/lock/subsys/authdaemon
else
msg_already_running "Courier IMAP - Authdaemon"
- exit 1
fi
;;
stop)
if [ -f /var/lock/subsys/authdaemon ]; then
msg_stopping "Courier IMAP - Authdaemon"
daemon /usr/lib/courier-imap/authlib/authdaemond.$METHOD stop
- RETVAL=$?
rm -f /var/lock/subsys/authdaemon
else
msg_not_running "Courier IMAP - Authdaemon"
- exit 1
fi
;;
- restart|reload)
+ restart|force-reload)
# restart related services, if running..
if [ -f /var/lock/subsys/courier-mta -a \
-x /etc/rc.d/init.d/courier-mta ]; then
$0 stop
$0 start
RETVAL=$?
- [[ $imaprun -eq 1 ]] && /etc/rc.d/init.d/courier-imap start
- [[ $poprun -eq 1 ]] && /etc/rc.d/init.d/courier-pop3 start
- [[ $crun -eq 1 ]] && /etc/rc.d/init.d/courier-mta start
+ [ $imaprun -eq 1 ] && /etc/rc.d/init.d/courier-imap start
+ [ $poprun -eq 1 ] && /etc/rc.d/init.d/courier-pop3 start
+ [ $crun -eq 1 ] && /etc/rc.d/init.d/courier-mta start
unset crun
unset poprun
unset imaprun
;;
status)
status authdaemond.$METHOD
+ exit $?
;;
*)
- msg_usage "$0 {start|stop|restart|reload|status}"
- exit 1
+ msg_usage "$0 {start|stop|restart|force-reload|status}"
+ exit 3
esac
exit $RETVAL
-
exit 0
fi
+RETVAL=0
# See how we were called.
case "$1" in
start)
fail
fi
-
if is_yes "$POP3DSSLSTART"; then
msg_starting "Courier POP3 (SSL)"
/usr/bin/env - /bin/sh -c " . /etc/sysconfig/courier-pop3 ; \
touch /var/lock/subsys/courier-pop3
else
msg_already_running "Courier POP3"
- exit 1
fi
;;
stop)
msg_stopping "Courier POP3 (SSL)"
daemon /usr/lib/courier-imap/couriertcpd -pid=/var/run/pop3d-ssl.pid -stop
fi
- RETVAL=$?
rm -f /var/lock/subsys/courier-pop3
else
msg_not_running "Courier POP3"
- exit 1
fi
;;
- restart|reload)
+ restart|force-reload)
$0 stop
$0 start
+ exit $?
;;
status)
status couriertcpd
+ exit $?
;;
*)
- msg_usage "$0 {start|stop|restart|reload|status}"
- exit 1
+ msg_usage "$0 {start|stop|restart|force-reload|status}"
+ exit 3
esac
exit $RETVAL
-
exit 0
fi
+RETVAL=0
# See how we were called.
case "$1" in
start)
fi
fi
msg_starting "Courier IMAP"
+ busy
ulimit -d $IMAP_ULIMITD
/usr/bin/env - /bin/sh -c " . /etc/sysconfig/courier-imap ; \
`sed -n '/^#/d;/=/p' </etc/sysconfig/courier-imap | \
touch /var/lock/subsys/courier-imap
else
msg_already_running "Courier IMAP"
- exit 1
fi
;;
stop)
msg_stopping "Courier IMAP (SSL)"
daemon /usr/lib/courier-imap/couriertcpd -pid=/var/run/imapd-ssl.pid -stop
fi
- RETVAL=$?
rm -f /var/lock/subsys/courier-imap
else
msg_not_running "Courier IMAP"
- exit 1
fi
;;
- restart|reload)
+ restart|force-reload)
$0 stop
$0 start
+ exit $?
;;
status)
status couriertcpd
+ exit $?
;;
*)
- msg_usage "$0 {start|stop|restart|reload|status}"
- exit 1
+ msg_usage "$0 {start|stop|restart|force-reload|status}"
+ exit 3
esac
exit $RETVAL
-