summaryrefslogtreecommitdiffstats
path: root/mail/cyrus-imapd22/files/imapd.sh
blob: d34317dd550114c911846d3632e147c88443675e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!/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
		/usr/local/cyrus/bin/master -d
		echo -n ' imapd'
	fi
	;;
stop)
	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
OpenPOWER on IntegriCloud