aboutsummaryrefslogtreecommitdiff
path: root/net/cvsup-mirror/files/cvsupd.sh
blob: 82cfddb523fc42c4504d6e6c02595c90bba5b243 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#! /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
out=/var/tmp/cvsupd.out

export PATH=/bin:/usr/bin:${PREFIX}/sbin
umask 2

test -x ${PREFIX}/sbin/cvsupd || exit 1
echo -n " cvsupd"
cd ${base} || exit
. ./config.sh || exit
su -m ${user} -c \
    "cvsupd -e -C ${maxclients} -l @${facility}" >>${out} 2>&1