aboutsummaryrefslogtreecommitdiff
path: root/mail/cyrus-imapd25/files/imapd.in
blob: 2956b91d5011581353fa0ed92e560e7a45994fd7 (plain) (blame)
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
27
28
29
30
31
32
33
34
35
36
37
#!/bin/sh

# Start or stop cyrus-imapd
# $FreeBSD$

# PROVIDE: cyrus_imapd imap
# REQUIRE: DAEMON
# BEFORE: mail
# KEYWORD: shutdown

# Define these cyrus_imapd_* variables in one of these files:
#	/etc/rc.conf
#	/etc/rc.conf.local
#	/etc/rc.conf.d/cyrus_imapd
#
# DO NOT CHANGE THESE DEFAULT VALUES HERE
#
[ -z "$cyrus_imapd_enable" ] && cyrus_imapd_enable="NO"	# Enable imapd
#cyrus_imapd_program="%%PREFIX%%/cyrus/bin/master"	# Location of imapd
[ -z "$cyrus_imapd_flags" ] && cyrus_imapd_flags="-d" # Flags to imapd program

. /etc/rc.subr

name="cyrus_imapd"
rcvar=cyrus_imapd_enable
command="%%PREFIX%%/cyrus/bin/master"
pidfile="/var/run/cyrus-master.pid"
required_files="%%PREFIX%%/etc/cyrus.conf %%PREFIX%%/etc/imapd.conf"
stop_postcmd="cyrus_imapd_poststop"
extra_commands="reload"

cyrus_imapd_poststop() {
	/bin/rm -f ${pidfile}
}

load_rc_config $name
run_rc_command "$1"