cyrus-imapd/imapd-initscript
Silvan Calarco 71384a1c11 rename master(8) man entry conflicting with postfix
fix files packaged into two packages [release 2.3.16-4mamba;Mon Apr 09 2012]
2024-01-05 21:37:39 +01:00

61 lines
1.2 KiB
Bash

#!/bin/sh
#
# imapd This shell script takes care of starting and stopping
# imapd (cyrus master daemon wrapper).
#
# chkconfig: 2345 55 10
# description: imapd is the Cyrus imap daemon.
# Source function library.
. /etc/rc.d/init.d/functions
# Source networking configuration.
. /etc/sysconfig/network
# Check that networking is up.
[ ${NETWORKING} = "no" ] && exit 0
[ -x /usr/libexec/cyrus/bin/master ] || exit 0
# See how we were called.
case "$1" in
start)
# Start daemons.
echo -n "Starting Cyrus imapd: "
/usr/libexec/cyrus/bin/master &
evaluate_retval
echo
touch /var/lock/subsys/cyrus
;;
stop)
# Stop daemons.
echo -n "Shutting down Cyrus imapd: "
killproc master
evaluate_retval
echo
rm -f /var/lock/subsys/cyrus
;;
status)
status master
;;
restart)
$0 stop
$0 start
;;
reload)
$0 stop
$0 start
;;
condrestart)
if [ -f /var/lock/subsys/cyrus ]; then
$0 stop
$0 start
fi
;;
*)
echo "Usage: imapd {start|stop|restart|status}"
exit 1
esac
exit 0