#!/bin/sh
#
# $FreeBSD: ports/games/pvpgn/files/bnetd.sh,v 1.2 2006/02/20 20:47:02 dougb Exp $
#

# PROVIDE: bnetd
# REQUIRE: DAEMON
# BEFORE: LOGIN
# KEYWORD: shutdown

#
# Add the following lines to /etc/rc.conf to enable bnetd:
#
#bnetd_enable="YES"
#
# See bnetd(1) for flags
#

. /etc/rc.subr

name=bnetd
rcvar=`set_rcvar`

command=/usr/local/sbin/bnetd
pidfile=/var/run/pvpgn/bnetd.pid
required_files=/usr/local/etc/pvpgn/bnetd.conf

stop_postcmd=stop_postcmd

stop_postcmd()
{
  rm -f $pidfile
}

# set defaults

bnetd_enable=${bnetd_enable:-"NO"}
bnetd_flags=${bnetd_flags:-""}

load_rc_config $name
run_rc_command "$1"
