centos_local_repo_rsync
This is an old revision of the document!
#!/bin/bash # name: centos-rsync # date: 20110711 # author: jason thomas <jthomas@blip.tv> # purpose: update local centos mirror with remote centos mirror LOCK="/var/lock/subsys/centos-rsync" REPO="/var/www/kitchen/htdocs/repos/centos" MIRROR="mirror.cogentco.com" CURRENT5="5.6" CURRENT6="6.0" if [ -f $LOCK ]; then exit 0 fi control_sigint(){ unlink $LOCK exit $? } trap control_sigint SIGINT if [ -d $REPO/$CURRENT5 ] ; then touch $LOCK rsync -avSHP --delete --exclude "local*" --exclude "isos" --exclude "i386" $MIRROR::CentOS/$CURRENT5/ $REPO/$CURRENT5/ unlink $LOCK fi if [ -d $REPO/$CURRENT6 ] ; then touch $LOCK rsync -avSHP --delete --exclude "local*" --exclude "isos" --exclude "i386" $MIRROR::CentOS/$CURRENT6/ $REPO/$CURRENT6/ unlink $LOCK fi
centos_local_repo_rsync.1310407007.txt.gz ยท Last modified: 2020/08/10 02:28 (external edit)