83eb2c3700
literal name_enable wherever possible, and ${name}_enable when it's not, to prepare for the demise of set_rcvar(). In cases where I had to hand-edit unusual instances also modify formatting slightly to be more uniform (and in some cases, correct). This includes adding some $FreeBSD$ tags, and most importantly moving rcvar= to right after name= so it's clear that one is derived from the other.
28 lines
485 B
Bash
28 lines
485 B
Bash
#!/bin/sh
|
|
# $FreeBSD$
|
|
|
|
# PROVIDE: gmond
|
|
# REQUIRE: DAEMON
|
|
# KEYWORD: shutdown
|
|
|
|
bname=`basename $0`
|
|
|
|
. /etc/rc.subr
|
|
|
|
name=`echo "${bname}" | tr ".-" "__"`
|
|
rcvar=${name}_enable
|
|
|
|
command="%%PREFIX%%/sbin/gmond"
|
|
|
|
load_rc_config ganglia
|
|
|
|
load_rc_config $bname
|
|
|
|
eval "${name}_enable=\${${name}_enable-NO}"
|
|
eval "conffile=\${${name}_conf-%%PREFIX%%/etc/${bname}.conf}"
|
|
|
|
pidfile="/var/run/${bname}.pid"
|
|
command_args="-c ${conffile} -p ${pidfile}"
|
|
required_files=${conffile}
|
|
|
|
run_rc_command $*
|