#!/bin/sh
#
# boom_agent init: Startup and kill script for the BOOM Agent
#
#Do not change the values for BOOM_ROOT, PATH or JAVA_BIN if
#you are going to use the install script! These will be
#automatically set.
#For manual installations without the install script
#just set the BOOM_ROOT variable to the agent's installation
#directory and others similar as shown below. 
#BOOM_ROOT=
#export BOOM_ROOT
#JAVA_BIN=/usr/local/bin/java
#PATH=${JAVA_BIN}:${BOOM_ROOT}:${BOOM_ROOT}/spi:/sbin:/usr/sbin:/bin:/usr/bin:${PATH}
#export PATH
#################
### BEGIN INIT INFO
# PROVIDE: boom_agt
# REQUIRE: DAEMON
# KEYWORD: shutdown
#
# Short-Description: boom agent daemon
# Description:       boom agent daemon init script
###
# Add the following line to /etc/rc.conf to enable the boom agent:
#
# boom_agt_enable="YES"
#
### END INIT INFO
#

if [ -z "$BOOM_ROOT" ]
then
echo "Error: You must set BOOM_ROOT to the Agent's Install directory."
exit 1
fi

. /etc/rc.subr

name="boom_agt"
rcvar=`set_rcvar`
load_rc_config $name

: ${boom_agt_enable="NO"}

pidfile="${BOOM_ROOT}/boom_agent.pid"
command="${BOOM_ROOT}/boom_agt"
#procname="java"
start_cmd="${BOOM_ROOT}/boom_agt -start"
stop_cmd="${BOOM_ROOT}/boom_agt -stop"
status_cmd="${BOOM_ROOT}/boom_agt -status"


run_rc_command "$1"

exit 0
