#!/bin/sh
#
# PROVIDE: innd
# REQUIRE: DAEMON
# KEYWORD: shutdown
#
# $FreeBSD: ports/news/inn/files/innd.sh.in,v 1.2 2006/10/31 02:35:51 shaun Exp $
#

. /etc/rc.subr

name=innd

PREFIX=/usr/local

innd_enable=${innd_enable-"NO"}
innd_user=${innd_user-"news"}
innd_group=${innd_group-"news"}

required_files="${PREFIX}/news/db/history.dir"

load_rc_config ${name}

start_cmd=${name}_start
stop_cmd=${name}_stop

rcvar=`set_rcvar`

command=${PREFIX}/news/bin/rc.news

innd_start() {
	su -fm ${innd_user} -c "${command} start"
}

innd_stop() {
	su -fm ${innd_user} -c "${command} stop"
}

load_rc_config ${name}
run_rc_command "$1"
