|
|
|
|
#!@l_prefix@/lib/openpkg/bash @l_prefix@/etc/rc
|
|
|
|
|
##
|
|
|
|
|
## rc.cvs -- Run-Commands
|
|
|
|
|
##
|
|
|
|
|
|
|
|
|
|
%config
|
|
|
|
|
cvs_enable="$openpkg_rc_def"
|
|
|
|
|
cvs_gflags=""
|
|
|
|
|
cvs_lflags=""
|
|
|
|
|
cvs_listen="127.0.0.1:2401"
|
|
|
|
|
cvs_log_prolog="true"
|
|
|
|
|
cvs_log_epilog="true"
|
|
|
|
|
cvs_log_numfiles="10"
|
|
|
|
|
cvs_log_minsize="1M"
|
|
|
|
|
cvs_log_complevel="9"
|
|
|
|
|
|
|
|
|
|
%common
|
|
|
|
|
cvs_pserverd_pidfile="@l_prefix@/var/cvs/pserverd.pid"
|
|
|
|
|
cvs_pserverd_signal () {
|
|
|
|
|
[ -f $cvs_pserverd_pidfile ] && kill -$1 `cat $cvs_pserverd_pidfile`
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
%status -p 200 -u root -o
|
|
|
|
|
cvs_usable="unknown"
|
|
|
|
|
cvs_active="no"
|
|
|
|
|
opService cvs enable yes && \
|
|
|
|
|
cvs_pserverd_signal 0 && cvs_active="yes"
|
|
|
|
|
echo "cvs_enable=\"$cvs_enable\""
|
|
|
|
|
echo "cvs_usable=\"$cvs_usable\""
|
|
|
|
|
echo "cvs_active=\"$cvs_active\""
|
|
|
|
|
|
|
|
|
|
%start -p 200 -u @l_susr@
|
|
|
|
|
opService cvs enable yes || exit 0
|
|
|
|
|
opService cvs active yes && exit 0
|
|
|
|
|
@l_prefix@/bin/cvs --version | grep RSE >/dev/null || exit 0
|
|
|
|
|
@l_prefix@/bin/cvs -f $cvs_gflags \
|
|
|
|
|
pserverd -d -p $cvs_pserverd_pidfile \
|
|
|
|
|
-l $cvs_listen $cvs_lflags
|
|
|
|
|
|
|
|
|
|
%stop -p 200 -u @l_susr@
|
|
|
|
|
opService cvs enable yes || exit 0
|
|
|
|
|
opService cvs active no && exit 0
|
|
|
|
|
cvs_pserverd_signal TERM
|
|
|
|
|
rm -f $cvs_pserverd_pidfile 2>/dev/null || true
|
|
|
|
|
|
|
|
|
|
%restart -p 200 -u @l_susr@
|
|
|
|
|
opService cvs enable yes || exit 0
|
|
|
|
|
opService cvs active no && exit 0
|
|
|
|
|
rc cvs stop start
|
|
|
|
|
|
|
|
|
|
%daily -u @l_susr@
|
|
|
|
|
opService cvs enable yes || exit 0
|
|
|
|
|
|
|
|
|
|
# rotate logfile
|
|
|
|
|
shtool rotate -f \
|
|
|
|
|
-n${cvs_log_numfiles} -s${cvs_log_minsize} -d \
|
|
|
|
|
-z${cvs_log_complevel} -m644 -o@l_musr@ -g@l_mgrp@ \
|
|
|
|
|
-P "${cvs_log_prolog}" \
|
|
|
|
|
-E "${cvs_log_epilog} && rc cvs restart" \
|
|
|
|
|
@l_prefix@/var/cvs/cvs.log
|
|
|
|
|
|