aboutsummaryrefslogtreecommitdiff
path: root/net-mgmt/pnp/files/npcd.sh.in
blob: 94369f3b572f4e9b810ae9bbd6237a36c058b69f (plain) (blame)
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
35
36
37
#!/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.
#

. %%RC_SUBR%%

name="npcd"
rcvar=`set_rcvar`

command="%%PREFIX%%/bin/npcd"
command_args="-d"
pidfile=/var/run/${name}.pid

: ${npcd_enable="NO"}
: ${npcd_flags=""}
: ${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"