freebsd-ports/net-mgmt/pnp/files/npcd.sh.in
Doug Barton 1d6b4b3f91 Begin the process of deprecating sysutils/rc_subr by
s#. %%RC_SUBR%%#. /etc/rc.subr#
2010-03-27 00:15:24 +00:00

36 lines
729 B
Bash

#!/bin/sh
#
# $FreeBSD$
#
# PROVIDE: npcd
# REQUIRE: DAEMON
# BEFORE: LOGIN
# KEYWORD: shutdown
#
# Add the following lines to /etc/rc.conf to enable/tune npcd:
# npcd_enable (bool): Set to "NO" by default.
# Set it to "YES" to enable npcd.
# npcd_flags (str): Set to "" by default.
# npcd_configfile (str): Set to "%%PREFIX%%/etc/pnp/npcd.cfg" by default.
#
. /etc/rc.subr
name="npcd"
rcvar=`set_rcvar`
command="%%PREFIX%%/bin/npcd"
command_args="-d"
pidfile=/var/run/${name}.pid
: ${npcd_enable="NO"}
: ${npcd_configfile:="%%PREFIX%%/etc/pnp/npcd.cfg"}
load_rc_config "${name}"
required_files="${npcd_configfile}"
command_args="${command_args} -f ${npcd_configfile}"
run_rc_command "$1"