Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
executable file 59 lines (52 sloc) 1.71 KB
#!/bin/sh
# $RedRiver: MirrorOpenBSD,v 1.11 2011/03/31 02:21:39 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/
#SERVER=rsync://mirror.team-cymru.org/OpenBSD/
#SERVER=rsync://mirrors.gigenet.com/OpenBSD/
#SERVER=rsync://mirror.jmu.edu/OpenBSD/
#SERVER=rsync://mirrors.nycbug.org/OpenBSD/
SERVER=rsync://openbsd.cs.toronto.edu/openbsd/
#SERVER=rsync://openbsd.mirrorcatalogs.com/openbsd/
#SERVER=rsync://mirror.esc7.net/openbsd/
#--dry-run \
rsync -a \
--delete \
--delete-excluded \
--verbose --log-format="%t [%p] %o %f %l" \
-f "include /5.[0123456789]/" \
-f "include /5.[0123456789]/*/" \
-f "include /5.7/i386/install*.iso" \
-f "include /5.7/i386/install*.fs" \
-f "include /5.7/amd64/install*.iso" \
-f "include /5.7/amd64/install*.fs" \
-f "include /5.[89]/*/install*.iso" \
-f "include /5.[89]/*/install*.fs" \
-f "include /snapshots/" \
-f "include /snapshots/*/" \
-f "include /snapshots/i386/install*.iso" \
-f "include /snapshots/i386/install*.fs" \
-f "include /snapshots/amd64/install*.iso" \
-f "include /snapshots/amd64/install*.fs" \
-f "include /songs/" \
-f "include /songs/*" \
-f "exclude **" \
${SERVER} ${OBT_DIR_FTP}/${OBT_BASENAME}
#-f "exclude /5.[0]/" \