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@fbsd ~]# fortune Happiness is just an illusion, filled with sadness and confusion.
CentOS-mirror mailing list CentOS-mirror@centos.org http://lists.centos.org/mailman/listinfo/centos-mirror