2001-03-13 12:15:12 +01:00
|
|
|
#!/bin/sh
|
|
|
|
|
2001-04-12 21:06:31 +02:00
|
|
|
# Start or stop cyrus-imapd
|
|
|
|
# $FreeBSD$
|
|
|
|
|
2001-03-13 12:15:12 +01:00
|
|
|
case "$1" in
|
|
|
|
start)
|
|
|
|
if [ -x /usr/local/cyrus/bin/master -a \
|
|
|
|
-f /usr/local/etc/cyrus.conf -a \
|
|
|
|
-f /usr/local/etc/imapd.conf ]; then
|
2003-02-04 16:55:54 +01:00
|
|
|
/usr/local/cyrus/bin/master -d
|
2001-03-13 12:15:12 +01:00
|
|
|
echo -n ' imapd'
|
|
|
|
fi
|
|
|
|
;;
|
|
|
|
stop)
|
2003-02-04 16:55:54 +01:00
|
|
|
if [ -r /var/run/cyrus-master.pid ]; then
|
|
|
|
kill `cat /var/run/cyrus-master.pid` && echo -n ' imapd'
|
|
|
|
rm /var/run/cyrus-master.pid
|
|
|
|
fi
|
2001-03-13 12:15:12 +01:00
|
|
|
;;
|
|
|
|
*)
|
|
|
|
echo "Usage: `basename $0` {start|stop}" >&2
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
exit 0
|