1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-24 04:33:24 +00:00
freebsd-ports/sysutils/apcupsd/files/apcupsd.in
Marcus Alves Grando a1543c18d2 - Fix typo in rc.d script
PR:		96240
Submitted by:	Alexander Logvinov <user___blg.akavia.ru>
Approved by:	maintainer via email
2006-04-24 03:26:54 +00:00

35 lines
738 B
Bash

#!/bin/sh
#
# $FreeBSD$
#
# 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).
#
. %%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="%%PREFIX%%/etc/apcupsd/apcupsd.conf"
command="%%PREFIX%%/sbin/apcupsd"
run_rc_command "$1"