#!/bin/sh
#
# $FreeBSD: ports/sysutils/apcupsd/files/apcupsd.in,v 1.3 2007/10/21 10:39:39 itetcu Exp $
#
# PROVIDE: apcupsd
# REQUIRE: SERVERS
# BEFORE: DAEMON
# KEYWORD: shutdown
#
# Add the following line to /etc/rc.conf[.local] to enable apcupsd
#
# apcupsd_enable (bool):	Set to "NO" by default.
#				Set it to "YES" to enable apcupsd.
# apcupsd_args (str):		Custom additional arguments to be passed
#				to apcupsd (default empty).
#

. /etc/rc.subr

name="apcupsd"
rcvar=${name}_enable

load_rc_config $name

: ${apcupsd_enable="NO"}
: ${apcupsd_flags="--kill-on-powerfail"}
: ${apcupsd_pidfile="/var/run/apcupsd.pid"}
: ${apcupsd_lockfile="/var/spool/lock/apcupsd.lock"}

pidfile="/var/run/apcupsd.pid"
required_files="/usr/local/etc/apcupsd/apcupsd.conf"
command="/usr/local/sbin/apcupsd"

run_rc_command "$1"


syntax highlighted by Code2HTML, v. 0.9.1