#!/bin/sh
#
# $FreeBSD: ports/net-mgmt/nrpe/files/nrpe.sh.in,v 1.2 2005/05/23 23:29:42 edwin Exp $
#

#
# Add the following lines to /etc/rc.conf to enable apache2:
# nrpe_enable (bool):	Set to "NO" by default.
#			Set it to "YES" to enable nrpe
# nrpe_config (string):	Set to "/usr/local/etc/nrpe.cfg" by default.
#

. /etc/rc.subr

name="nrpe"
rcvar=`set_rcvar`

command="/usr/local/sbin/nrpe"

[ -z "$nrpe_enable" ]	&& nrpe_enable="NO"
[ -z "$nrpe_config" ]	&& nrpe_config="/usr/local/etc/nrpe.cfg"

nrpe_flags="-c ${nrpe_config} --daemon"

load_rc_config $name

run_rc_command "$1"
