freebsd-ports/sysutils/openhpi/files/openhpid.in
Tijl Coosemans 9af7fc6455 Improve the rc script a bit. "-c <conf>" isn't optional. Also use
%%ETCDIR%% as suggested by jbeich.
2016-03-22 08:52:27 +00:00

25 lines
456 B
Bash

#!/bin/sh
#
# $FreeBSD$
#
# PROVIDE: openhpid
# REQUIRE: DAEMON
# KEYWORD: shutdown
#
# Add the following to /etc/rc.conf[.local] to enable this service
#
# openhpid_enable="YES"
#
. /etc/rc.subr
: ${openhpid_enable:=NO} ${openhpid_config:=%%ETCDIR%%/openhpi.conf}
name=openhpid
rcvar=openhpid_enable
command="%%PREFIX%%/sbin/openhpid"
command_args="-c ${openhpid_config}"
required_files="${openhpid_config}"
load_rc_config ${name}
run_rc_command "$1"