aboutsummaryrefslogtreecommitdiff
path: root/net-mgmt/ndoutils/files/ndo2db.in
blob: d995288e3ef38a11e16ae53238eca9cee2e37461 (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
#!/bin/sh
#
# $FreeBSD$
#
# PROVIDE: ndo2db
# REQUIRE: DAEMON nagios
# BEFORE: LOGIN
# KEYWORD: shutdown

# Add the following lines to /etc/rc.conf to enable ndo2db:
# ndo2db_enable (bool):    Set to "NO" by default.
# ndo2db_flags (str):      Set to "" by default.
# ndo2db_configfile (str): Set to "%%PREFIX%%/etc/nagios/ndo2db.cfg" by default.

: ${ndo2db_enable="NO"}
: ${ndo2db_configfile="%%PREFIX%%/etc/nagios/ndo2db.cfg"}

. /etc/rc.subr

name="ndo2db"
rcvar=${name}_enable

command="%%PREFIX%%/bin/ndo2db-3x"
required_files="${ndo2db_configfile}"
command_args="-c ${ndo2db_configfile}"

load_rc_config $name
run_rc_command "$1"