summaryrefslogtreecommitdiffstats
path: root/sysutils/apcupsd/files/apcupsd.in
blob: 83ef00ab3aafafd9058af2caf79c253b74706189 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/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).
#

. /etc/rc.subr

name="apcupsd"
rcvar=apcupsd_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="%%ETCDIR%%/apcupsd.conf"
command="%%PREFIX%%/sbin/apcupsd"

run_rc_command "$1"
OpenPOWER on IntegriCloud