[CentOS-mirror] Cron Script

Mon Dec 18 16:15:46 UTC 2006
William Dunn <wdunn at cs.vt.edu>

Here is a complete amateur's effort:

#!/bin/bash
if [ -f /root/rsync-scripts/centos.lockfile ]
then
#echo "lock file exists, exiting..."
exit
fi
#echo "creating lock file..."
touch /root/rsync-scripts/centos.lockfile
rsync -aqzH --partial --delete us-msync.centos.org::CentOS 
/home/ftp/pub/CentOS
#echo "this is where rsync is"
rm -f /root/rsync-scripts/centos.lockfile

Obviously, the echos were there when i was testing it.

~Will

David Stanford wrote:
> Hello,
> 
> Would somebody be kind enough to provide me with a cron script using a 
> lock file for updating via rsync. I'd rather not have to reinvent the 
> wheel...
> 
> Thanks!
> 
> -David
> -- 
> [root at fbsd ~]# fortune
> Happiness is just an illusion, filled with sadness and confusion.
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> CentOS-mirror mailing list
> CentOS-mirror at centos.org
> http://lists.centos.org/mailman/listinfo/centos-mirror

-- 
William Dunn
Unix / Linux Administrator
Virginia Tech Computer Science Department
wdunn at cs.vt.edu / 540-231-3167