1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-03 01:23:49 +00:00
freebsd-ports/sysutils/munin-node/files/munin-node.in
Chris Rees 16eb7c2ca0 Stop checking for get_pidfile_from_conf function in rc.subr.
It is present in all supported versions of FreeBSD, and has had poor takeup.
I strongly suspect the strange-looking checks are partially to blame for
scaring maintainers off.

Go forth and please use it!

PR:		ports/178269
Approved by:	maintainers of all ports involved
2013-05-31 11:54:01 +00:00

39 lines
836 B
Bash

#!/bin/sh
#
# $FreeBSD$
#
# PROVIDE: munin-node
# REQUIRE: DAEMON
# BEFORE: cron
# KEYWORD: shutdown
#
# 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
# munin_node_config (path): Set to "%%PREFIX%%/etc/munin/munin-node.conf" by default.
#
. /etc/rc.subr
name=munin_node
rcvar=munin_node_enable
load_rc_config $name
: ${munin_node_enable:=NO}
: ${munin_node_config="%%PREFIX%%/etc/munin/munin-node.conf"}
command="%%PREFIX%%/sbin/munin-node"
command_interpreter="%%PREFIX%%/bin/perl"
start_precmd=find_pidfile
status_precmd=find_pidfile
stop_precmd=find_pidfile
find_pidfile()
{
get_pidfile_from_conf pid_file $munin_node_config
pidfile="$_pidfile_from_conf"
}
run_rc_command $1