freebsd-ports/databases/cyrus-imspd/files/imspd.in
Cheng-Lung Sung 5e9a798438 - Update of cyrus-imspd from 1.7b to 1.8
- Startup script updated to rcNG

PR:		ports/108740
Submitted by:	Martin Matuska <martin_AT_matuska dot org>
2007-02-05 00:45:22 +00:00

41 lines
741 B
Bash

#! /bin/sh
#
#
# PROVIDE: imspd
# REQUIRE: DAEMON NETWORKING SERVERS
#
# Add the following line to /etc/rc.conf to enable imspd:
#
# imspd_enable="YES"
#
# Tweakable parameters for users to override in rc.conf
. "%%RC_SUBR%%"
name=imspd
load_rc_config ${name}
: ${imspd_enable="NO"}
: ${imspd_pidfile=/var/run/imspd.pid}
: ${imspd_options=/var/imspd/options}
rcvar=`set_rcvar`
pidfile=${imspd_pidfile}
start_postcmd="start_postcmd"
stop_postcmd="stop_postcmd"
required_files=${imspd_options}
command="%%PREFIX%%/sbin/imspd"
command_args=">/dev/null &"
start_postcmd()
{
PID=`pgrep imspd`
[ -n "${PID}" ] && echo ${PID} > ${pidfile}
}
stop_postcmd()
{
[ -f "${pidfile}" ] && rm ${pidfile}
}
run_rc_command "$1"