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

43 lines
999 B
Bash
Raw Normal View History

#!/bin/sh
# Start or stop cyrus-imapd
# $FreeBSD$
2003-08-30 16:17:22 +02:00
# PROVIDE: cyrus_imapd
# REQUIRE: DAEMON
# BEFORE: mail
# KEYWORD: FreeBSD shutdown
#
# NOTE for FreeBSD 5.0+:
# If you want this script to start with the base rc scripts
# move imapd.sh to /etc/rc.d/cyrus_imapd
2003-08-30 16:17:22 +02:00
prefix=%%PREFIX%%
2003-09-26 19:15:16 +02:00
# Define these cyrus_imapd_* variables in one of these files:
2003-08-30 16:17:22 +02:00
# /etc/rc.conf
# /etc/rc.conf.local
# /etc/rc.conf.d/cyrus_imapd
#
2003-09-26 19:15:16 +02:00
# DO NOT CHANGE THESE DEFAULT VALUES HERE
2003-08-30 16:17:22 +02:00
#
[ -z "$cyrus_imapd_enable" ] && cyrus_imapd_enable="NO" # Enable imapd
2003-08-30 16:17:22 +02:00
#cyrus_imapd_program="${prefix}/cyrus/bin/master" # Location of imapd
[ -z "$cyrus_imapd_flags" ] && cyrus_imapd_flags="-d" # Flags to imapd program
2003-08-30 16:17:22 +02:00
. %%RC_SUBR%%
name="cyrus_imapd"
rcvar=`set_rcvar`
command="${prefix}/cyrus/bin/master"
pidfile="/var/run/cyrus-master.pid"
required_files="${prefix}/etc/cyrus.conf ${prefix}/etc/imapd.conf"
2003-12-04 09:20:08 +01:00
stop_postcmd="cyrus_imapd_poststop"
cyrus_imapd_poststop() {
/bin/rm -f ${pidfile}
}
2003-08-30 16:17:22 +02:00
load_rc_config $name
run_rc_command "$1"