freebsd-ports/mail/cyrus-imapd2/files/imapd.sh

27 lines
470 B
Bash
Raw Normal View History

#!/bin/sh
# Start or stop cyrus-imapd
# $FreeBSD$
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
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
;;
*)
echo "Usage: `basename $0` {start|stop}" >&2
;;
esac
exit 0