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.
30 lines
637 B
Bash
30 lines
637 B
Bash
#!/bin/sh
|
|
#
|
|
# $FreeBSD$
|
|
#
|
|
# PROVIDE: bcfg2
|
|
# REQUIRE: LOGIN
|
|
# KEYWORD: shutdown
|
|
#
|
|
# Add the following lines to /etc/rc.conf to enable bcfg2-server:
|
|
# bcfg2_enable (bool): Set it to "YES" to enable bcfg2.
|
|
# Default is "NO".
|
|
# bcfg2_flags (str): Flags passed to bcfg2 on startup.
|
|
# Default is "".
|
|
|
|
. /etc/rc.subr
|
|
|
|
name="bcfg2"
|
|
rcvar=bcfg2_enable
|
|
|
|
load_rc_config $name
|
|
|
|
: ${bcfg2_enable="NO"}
|
|
: ${bcfg2_pidfile="/var/run/$name.pid"}
|
|
: ${bcfg2_flags="-D ${bcfg2_pidfile}"}
|
|
|
|
pidfile=${bcfg2_pidfile}
|
|
command=%%PREFIX%%/bin/${name}-server
|
|
command_interpreter=%%PYTHON_CMD%%
|
|
|
|
run_rc_command "$1"
|