6cf7c9532f
- Add LICENSE [1] - Minor changes in files/{pkg-message.in, sancp.in} [1] - Add stage support [1] - Remove indefinite article from COMMENT - Fix build with clang PR: ports/182445 Submitted by: Paul Schmehl <pauls@utdallas.edu> (maintainer) [1] Approved by: wg/culot (mentors, implicit)
45 lines
846 B
Bash
45 lines
846 B
Bash
#!/bin/sh
|
|
|
|
# $FreeBSD$
|
|
#
|
|
# PROVIDE: sancp
|
|
# REQUIRE: DAEMON
|
|
# BEFORE: LOGIN
|
|
# KEYWORD: shutdown
|
|
|
|
# Add the following lines to /etc/rc.conf to enable sancp:
|
|
# sancp_enable (bool): Set to YES to enable sancp
|
|
# Default: NO
|
|
# sancp_flags (str): Extra flags passed to sancp
|
|
# Default: -D
|
|
# sancp_conf (str): Sancp configuration file
|
|
# Default: %%PREFIX%%/etc/sancp.conf
|
|
# sancp_interface (str): Default: none - MUST BE SET
|
|
#
|
|
|
|
. /etc/rc.subr
|
|
|
|
name="sancp"
|
|
rcvar=sancp_enable
|
|
|
|
command="%%PREFIX%%/bin/sancp"
|
|
|
|
start_precmd=start_precmd
|
|
|
|
start_precmd()
|
|
{
|
|
if [ -z "${sancp_interface}" ]; then
|
|
err 1 "sancp_interface must set."
|
|
fi
|
|
}
|
|
|
|
# set some defaults
|
|
load_rc_config $name
|
|
|
|
: ${sancp_enable="NO"}
|
|
: ${sancp_flags="-D"}
|
|
: ${sancp_conf="%%PREFIX%%/etc/sancp.conf"}
|
|
|
|
command_args="-c ${sancp_conf} -i ${sancp_interface}"
|
|
|
|
run_rc_command "$1"
|