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.
32 lines
772 B
Bash
32 lines
772 B
Bash
#!/bin/sh
|
|
#
|
|
# $FreeBSD$
|
|
#
|
|
|
|
# PROVIDE: igmpproxy
|
|
# REQUIRE: NETWORKING
|
|
# KEYWORD: shutdown
|
|
|
|
# The following variables are provided to control startup of igmpproxy
|
|
# rc configuration file (eg /etc/rc.conf):
|
|
# igmpproxy_enable (bool): Set to "NO" by default.
|
|
# Set it to "YES" to enable igmpproxy.
|
|
# igmpproxy_conf (path): Set full path to configuration file.
|
|
# Default is "%%PREFIX%%/etc/igmpproxy.conf"
|
|
|
|
. /etc/rc.subr
|
|
|
|
name="igmpproxy"
|
|
rcvar=igmpproxy_enable
|
|
procname="%%PREFIX%%/sbin/${name}"
|
|
command=/usr/sbin/daemon
|
|
required_files="%%PREFIX%%/etc/igmpproxy.conf"
|
|
|
|
load_rc_config $name
|
|
|
|
igmpproxy_enable=${igmpproxy_enable-"NO"}
|
|
igmpproxy_conf=${igmpproxy_config-"%%PREFIX%%/etc/igmpproxy.conf"}
|
|
|
|
command_args=" -cf $procname $igmpproxy_conf"
|
|
|
|
run_rc_command "$1"
|