#!/bin/sh

# PROVIDE: bopm
# REQUIRE: DAEMON
# KEYWORD: shutdown

#
# Add the following line to /etc/rc.conf to enable bopm:
# bopm_enable (bool):	Set to "NO" by default.
#			Set it to "YES" to enable bopm.
# bopm_config (str):	Default to "/usr/local/etc/bopm.conf"
#			Configuration file for bopm.
# bopm_flags (str):	Custom flags passed to the bopm
#			daemon (default empty).
#
. /etc/rc.subr

name="bopm"
rcvar=`set_rcvar`

load_rc_config $name

: ${bopm_enable="NO"}
: ${bopm_config="/usr/local/etc/bopm.conf"}
: ${bopm_flags=""}

bopm_user="bopm"
pidfile="/var/log/bopm/bopm.pid"
required_files="${bopm_config}"

# NOTE: bopm behaves differently with or without the -d flag.
# If you choose to use -d, you will probably need to redirect
# stdout and stderr to appropriate places.
#
command="/usr/local/bin/bopm"
command_args="${bopm_flags} &"

run_rc_command "$1"


syntax highlighted by Code2HTML, v. 0.9.1