mirror of
https://git.freebsd.org/ports.git
synced 2025-06-22 13:10:31 -04:00
We have not checked for this KEYWORD for a long time now, so this is a complete noop, and thus no PORTREVISION bump. Removing it at this point is mostly for pedantic reasons, and partly to avoid perpetuating this anachronism by copy and paste to future scripts.
50 lines
905 B
Bash
50 lines
905 B
Bash
#! /bin/sh
|
|
#
|
|
# $FreeBSD$
|
|
#
|
|
|
|
# PROVIDE: cvsupd
|
|
# REQUIRE: DAEMON
|
|
# KEYWORD: shutdown
|
|
|
|
#
|
|
# Add the following lines to /etc/rc.conf to enable cvsupd:
|
|
#
|
|
#cvsupd_enable="YES"
|
|
|
|
. %%RC_SUBR%%
|
|
|
|
name="cvsupd"
|
|
rcvar=`set_rcvar`
|
|
|
|
load_rc_config $name
|
|
|
|
# Load defaults from cvsupd config file
|
|
base="%%PREFIX%%/etc/cvsup"
|
|
if [ ! -r "${base}/config.sh" ]; then
|
|
err 1 "${base}/config.sh is not readable."
|
|
fi
|
|
. ${base}/config.sh
|
|
|
|
# Set defaults
|
|
: ${cvsupd_enable:=NO}
|
|
: ${cvsupd_outfile=/var/run/${name}.out}
|
|
: ${cvsupd_user:=${user:-cvsup}}
|
|
|
|
command="%%PREFIX%%/sbin/cvsupd"
|
|
command_args="-e -C ${maxclients:-8} -l @${facility:-daemon} \
|
|
-b ${base:-/home/ncvs} -s sup.client"
|
|
stop_cmd="cvsupd_stop"
|
|
|
|
cvsupd_stop() {
|
|
if [ -z "$rc_pid" ]; then
|
|
echo "${name} not running?"
|
|
exit 1
|
|
fi
|
|
echo "Stopping ${name}."
|
|
killall $name
|
|
_return=$?
|
|
[ "$_return" -ne 0 ] && [ -z "$rc_force" ] && return 1
|
|
}
|
|
|
|
run_rc_command "$1"
|