freebsd-ports/sysutils/py-bcfg2/files/bcfg2.in
Doug Barton 1d6b4b3f91 Begin the process of deprecating sysutils/rc_subr by
s#. %%RC_SUBR%%#. /etc/rc.subr#
2010-03-27 00:15:24 +00:00

30 lines
639 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=${name}_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"