2004-12-14 02:44:54 +01:00
|
|
|
#!/bin/sh
|
|
|
|
#
|
2013-02-16 14:30:41 +01:00
|
|
|
# $FreeBSD$
|
|
|
|
#
|
2004-12-14 02:44:54 +01:00
|
|
|
# PROVIDE: munin-node
|
|
|
|
# REQUIRE: DAEMON
|
|
|
|
# BEFORE: cron
|
2013-02-16 14:30:41 +01:00
|
|
|
# KEYWORD: shutdown
|
2004-12-14 02:44:54 +01:00
|
|
|
#
|
|
|
|
# Add the following lines to /etc/rc.conf to enable munin-node:
|
|
|
|
# munin_node_enable (bool): Set to "NO" by default.
|
|
|
|
# Set it to "YES" to enable munin-node
|
2005-03-04 18:47:19 +01:00
|
|
|
# munin_node_config (path): Set to "%%PREFIX%%/etc/munin/munin-node.conf" by default.
|
2004-12-14 02:44:54 +01:00
|
|
|
#
|
|
|
|
|
2010-03-27 01:15:24 +01:00
|
|
|
. /etc/rc.subr
|
2004-12-14 02:44:54 +01:00
|
|
|
|
2013-05-31 13:54:01 +02:00
|
|
|
name=munin_node
|
2012-01-14 09:57:23 +01:00
|
|
|
rcvar=munin_node_enable
|
2004-12-14 02:44:54 +01:00
|
|
|
|
2013-02-16 14:30:41 +01:00
|
|
|
load_rc_config $name
|
|
|
|
|
|
|
|
: ${munin_node_enable:=NO}
|
|
|
|
: ${munin_node_config="%%PREFIX%%/etc/munin/munin-node.conf"}
|
2004-12-14 02:44:54 +01:00
|
|
|
|
2005-03-04 18:47:19 +01:00
|
|
|
command="%%PREFIX%%/sbin/munin-node"
|
2013-05-10 17:34:10 +02:00
|
|
|
command_interpreter="%%PREFIX%%/bin/perl"
|
2013-02-16 14:30:41 +01:00
|
|
|
start_precmd=find_pidfile
|
|
|
|
status_precmd=find_pidfile
|
|
|
|
stop_precmd=find_pidfile
|
|
|
|
|
|
|
|
find_pidfile()
|
|
|
|
{
|
2013-05-31 13:54:01 +02:00
|
|
|
get_pidfile_from_conf pid_file $munin_node_config
|
|
|
|
pidfile="$_pidfile_from_conf"
|
2013-02-16 14:30:41 +01:00
|
|
|
}
|
2004-12-14 02:44:54 +01:00
|
|
|
|
2013-05-31 13:54:01 +02:00
|
|
|
run_rc_command $1
|