#!/bin/sh
TARGET=/home/ftp/pub/debian
## syncing sputnik-mirror with wr-linux02

SHOST=wostok
RET=`fping ${SHOST} 2> /dev/null`
if [ ! `echo $RET | grep -c "alive"` -gt 0 ] ; then
  echo $SHOST not reachable try wr-linux02.
  SHOST=wr-linux02
fi

rsync -rlptDzuv --delete --exclude .temp --exclude private-games --exclude private --exclude "*i386*" ${SHOST}:/home/ftp/pub/debian/* ${TARGET}
