mirror of
https://git.FreeBSD.org/ports.git
synced 2024-12-05 01:55:52 +00:00
1d6b4b3f91
s#. %%RC_SUBR%%#. /etc/rc.subr#
37 lines
714 B
Bash
37 lines
714 B
Bash
#!/bin/sh
|
|
#
|
|
# $FreeBSD$
|
|
#
|
|
# PROVIDE: opendd
|
|
# REQUIRE: NETWORKING
|
|
#
|
|
# Add the following line to /etc/rc.conf[.local] to enable opendd
|
|
#
|
|
# opendd_enable (bool): Set to "NO" by default.
|
|
# Set it to "YES" to enable opendd.
|
|
|
|
. /etc/rc.subr
|
|
|
|
name="opendd"
|
|
rcvar=${name}_enable
|
|
|
|
load_rc_config $name
|
|
|
|
: ${opendd_enable="NO"}
|
|
: ${opendd_pidfile="/var/run/opendd.pid"}
|
|
|
|
command="%%PREFIX%%/sbin/opendd"
|
|
required_files="%%ETCDIR%%/opendd.conf"
|
|
pidfile="/var/run/opendd.pid"
|
|
start_precmd="opendd_check"
|
|
|
|
opendd_check()
|
|
{
|
|
if ! egrep -q -i -E "^runasdaemon.*=.*1$" ${required_files}
|
|
then
|
|
err 1 "opendd script need "runasdaemon=1" on config file"
|
|
fi
|
|
}
|
|
|
|
run_rc_command "$1"
|