freebsd-ports/sysutils/apcupsd/files/apcupsd.in
Ion-Mihai Tetcu a62bccf85a - Update to 3.14.2
- Now the port build depends on devel/makedepend
- Utilize ETCDIR for Makefile and pkg-plist
- Move pkg-message to FILESDIR
- No need to use USE_GETTEXT=yes, because port doesn't install any mo files
and --enable-nls option doesn't help. With --with-included-gettext apcupsd
doesn't build.

PR:		ports/116774
Submitted by:	Alexander Logvinov
2007-10-21 10:39:39 +00:00

34 lines
726 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="%%ETCDIR%%/apcupsd.conf"
command="%%PREFIX%%/sbin/apcupsd"
run_rc_command "$1"