#!/bin/bash RSYNC="/usr/bin/rsync" OPTS="-rtlvH --delete-after --delay-updates --safe-links --max-delete=1000" # from wiki.archlinux.org SRC="rsync://ftp5.gwdg.de/pub/linux/archlinux/" DST="/mirror/ftp/pub/archlinux/" lockfile=/tmp/`basename $0`.lock if lockfile -r 5 $lockfile then ${RSYNC} ${OPTS} ${SRC} ${DST} echo "End: "`date` rm -f $lockfile fi