1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-19 00:13:33 +00:00
freebsd-ports/net-mgmt/pnp/files/npcd.in
2021-04-06 16:31:13 +02:00

35 lines
748 B
Bash

#!/bin/sh
# 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"
desc="Nagios performance C daemon"
rcvar=npcd_enable
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"