[BACK]Return to MirrorOpenBSD CVS log [TXT][DIR] Up to [local] / openbsd / OpenBSDTorrents

File: [local] / openbsd / OpenBSDTorrents / MirrorOpenBSD (download)

Revision 1.10, Wed May 19 22:18:02 2010 UTC (14 years ago) by andrew
Branch: MAIN
Changes since 1.9: +9 -6 lines

Change mirrors, exclude Changelogs, move to 4.7

#!/bin/sh
# $RedRiver: MirrorOpenBSD,v 1.9 2010/03/03 18:24:47 andrew Exp $

. /etc/OpenBSDTorrents.conf

cd ${OBT_DIR_HOME}
PIDFILE=${OBT_DIR_HOME}/run/mirror.pid

if [ -e ${PIDFILE} ]; then
	PID=`head -1 ${PIDFILE}`
	kill -0 ${PID} 2> /dev/null
	if [ $? -eq 0 ]; then
		echo $0 Already running
		exit 1
	fi
fi
echo $$ > ${PIDFILE}

SERVER=rsync://ftp3.usa.openbsd.org/ftp/
#SERVER=rsync://ftp5.usa.openbsd.org/ftp/
#SERVER=rsync://openbsd.mirrors.tds.net/OpenBSD
#SERVER=rsync://openbsd.mirror.frontiernet.net/OpenBSD
#SERVER=rsync://mirror.rit.edu/OpenBSD/
#SERVER=rsync://filedump.se.rit.edu/OpenBSD/
#SERVER=rsync://mirror.planetunix.net/OpenBSD/

#	--dry-run \
rsync -a \
	--delete \
        --delete-excluded \
	--verbose=1 --log-format="%t [%p] %o %f %l" \
	-f "exclude .*" \
	-f "exclude ls-lR.gz" \
	-f "exclude /OpenBGPD/" \
	-f "exclude /OpenNTPD/" \
	-f "exclude /OpenSSH/" \
	-f "exclude /cvs/" \
	-f "exclude /src/" \
	-f "exclude /distfiles/" \
	-f "exclude /patches/" \
	-f "exclude */Changelogs/" \
	-f "exclude /snapshots/packages/" \
	-f "exclude /[23].?/" \
	-f "exclude /4.[012345]/" \
	-f "exclude /4.[689]/packages/" \
	${SERVER} ${OBT_DIR_FTP}/${OBT_BASENAME}