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

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

Revision 1.2, Mon Nov 6 23:22:22 2006 UTC (17 years, 6 months ago) by andrew
Branch: MAIN
Changes since 1.1: +19 -26 lines

switch back to rsync.  it seems way more better gooder

#!/bin/sh
# $RedRiver: MirrorOpenBSD,v 1.1 2006/07/24 18:03:53 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 Already running
		exit 1
	fi
fi
echo $$ > ${PIDFILE}

SERVER=rsync://openbsd.mirrors.tds.net/OpenBSD
#SERVER=rsync://ftp3.usa.openbsd.org/ftp/

rsync -az --delete --delete-excluded \
	--verbose=1 --log-format="%o \`%f'%L %b %l" \
	-f "exclude ls-lR.gz" \
	-f "exclude \.mirror\." \
	-f "exclude /\." \
	-f "exclude /OpenBGPD/" \
	-f "exclude /OpenNTPD/" \
	-f "exclude /OpenSSH/" \
	-f "exclude /cvs/" \
	-f "exclude /src/" \
	-f "exclude /distfiles/" \
	-f "exclude /patches/" \
	-f "exclude /snapshots/packages/" \
	-f "exclude /2\.?/" \
	-f "exclude /3\.[0-8]/" \
	${SERVER} ${OBT_DIR_FTP}/${OBT_BASENAME}