1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-11 02:50:24 +00:00
freebsd-ports/net-mgmt/nsca/files/nsca.in
Martin Matuska 5ee871c508 NSCA doesn't really need a installed nagios
Fix $FreeBSD$ in nsca.in
2013-01-29 19:53:00 +00:00

36 lines
787 B
Bash

#!/bin/sh
# $FreeBSD$
#
# PROVIDE: nsca
# REQUIRE: nagios
# BEFORE: LOGIN
# KEYWORD: shutdown
#
# Add the following lines to /etc/rc.conf to enable nsca:
# nsca_enable (bool): Set to "NO" by default.
# Set it to "YES" to enable nsca.
# nsca_flags (str): Set to "--daemon" by default.
# nsca_configfile (str): Set to "%%PREFIX%%/etc/nagios/nsca.cfg" by default.
#
. /etc/rc.subr
name="nsca"
rcvar=nsca_enable
command="%%PREFIX%%/sbin/nsca"
pidfile="/var/run/nsca.pid"
extra_commands=reload
nsca_enable=${nsca_enable:-"NO"}
nsca_flags=${nsca_flags:-"--daemon"}
nsca_configfile=${nsca_configfile:-"%%PREFIX%%/etc/nagios/nsca.cfg"}
load_rc_config "${name}"
required_files="${nsca_configfile}"
command_args="-c ${nsca_configfile}"
run_rc_command "$1"