1997-02-02 04:11:35 +00:00
|
|
|
#! /bin/sh
|
|
|
|
|
|
|
|
if ! PREFIX=$(expr $0 : "\(/.*\)/etc/rc\.d/cvsupd\.sh\$"); then
|
|
|
|
echo "$0: Cannot determine the PREFIX" >&2
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
base=${PREFIX}/etc/cvsup
|
2000-01-28 06:42:37 +00:00
|
|
|
rundir=/var/tmp
|
|
|
|
out=${rundir}/cvsupd.out
|
1997-02-02 04:11:35 +00:00
|
|
|
|
|
|
|
export PATH=/bin:/usr/bin:${PREFIX}/sbin
|
|
|
|
umask 2
|
|
|
|
|
|
|
|
test -x ${PREFIX}/sbin/cvsupd || exit 1
|
|
|
|
echo -n " cvsupd"
|
2000-01-28 06:42:37 +00:00
|
|
|
cd ${rundir} || exit
|
|
|
|
. ${base}/config.sh || exit
|
|
|
|
|
|
|
|
arg=${1:-start}
|
|
|
|
case $arg in
|
|
|
|
start)
|
|
|
|
su -m ${user} -c \
|
|
|
|
"cvsupd -e -C 100 -l @${facility} -b ${base} -s sup.client" \
|
|
|
|
>>${out} 2>&1;;
|
|
|
|
|
|
|
|
stop)
|
|
|
|
killall cvsupd;;
|
|
|
|
esac
|