#!/bin/sh
#
# $FreeBSD: ports/net-mgmt/nagircbot/files/nagircbot.in,v 1.5 2012/11/17 06:00:34 svnexp Exp $
#
# PROVIDE: nagircbot
# REQUIRE: NETWORKING
# KEYWORD: shutdown
#
# Add the following lines to /etc/rc.conf to enable nagircbot:
#
# nagircbot_enable="YES"
# nagircbot_flags="<set as needed>"
#
# You must configure at least some flags to make it connect to a server. See -h.
#

. /etc/rc.subr

name=nagircbot
rcvar=nagircbot_enable

pidfile=/var/run/nagios/${name}.pid
command=/usr/local/bin/nagircbot
command_args="-P $pidfile -z nagios"

# set defaults

nagircbot_enable=${nagircbot_enable:-"NO"}

load_rc_config ${name}
run_rc_command "$1"
