freebsd-ports/sysutils/ganglia-monitor-core/files/gmond.sh.in
Doug Barton 83eb2c3700 In the rc.d scripts, change assignments to rcvar to use the
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.
2012-01-14 08:57:23 +00:00

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 $*