2001-03-13 06:15:12 -05:00
|
|
|
#!/bin/sh
|
|
|
|
|
2001-04-12 15:06:31 -04:00
|
|
|
# Start or stop cyrus-imapd
|
|
|
|
# $FreeBSD$
|
|
|
|
|
2001-03-13 06:15:12 -05: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
|
|
|
|
/usr/local/cyrus/bin/master &
|
|
|
|
echo -n ' imapd'
|
|
|
|
fi
|
|
|
|
;;
|
|
|
|
stop)
|
2001-03-22 06:17:17 -05:00
|
|
|
kill `ps -U cyrus | awk '/master/ {print $1}'` && echo -n ' imapd'
|
2001-03-13 06:15:12 -05:00
|
|
|
;;
|
|
|
|
*)
|
|
|
|
echo "Usage: `basename $0` {start|stop}" >&2
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
exit 0
|