Shouldn't we be using rsync instead of wget? > -----Original Message----- > From: centos-bounces@xxxxxxxxxx > [mailto:centos-bounces@xxxxxxxxxx] On Behalf Of Paul > Sent: Monday, June 20, 2005 8:37 PM > To: CentOS mailing list > Subject: Re: script to make a CentOS 4.0 respository > updates server... > > On Mon, 2005-06-20 at 14:14 -0500, israel.garcia@xxxxxxxxxxxx wrote: > > List, I have a CentOS 4.0 server in my intranet which will > serves as a > > CentOS repository updates, so I need a script to do that job, I can > > not use RSYNC. I just want to download CentOS 4.0 updates > every night. > > > > Can you help me? > > > > Regards, > > Israel > > > > The following script is one I use ... though it could be > optimized to just download the RPMs and use createrepo to > recreate the metadata. > > The script I use is as follows: > #!/bin/sh > # > # mirror-centos.sh - Mirror CentOS Linux Updates # > > # Variables > MIRROR="mirror.cs.wisc.edu" > WBDIR="pub/mirrors/linux/caosity.org/centos" > VERSIONS="4" > ARCHS="SRPMS i386 x86_64" > WBUPDATES="/home/ftp/pub/centos" > PROXY="http://firewall.company.com:8080/" > > # Limit Transfer Rate to 10K bytes per second MAXRATE="10k" > > # Do the mirror > for d in $VERSIONS; do > for y in $ARCHS; do > cd $WBUPDATES > ## env http_proxy=$PROXY \ > wget --non-verbose --no-host-directories --cut-dirs=8 --mirror \ > --passive-ftp --limit-rate=$MAXRATE \ > --directory-prefix=$WBUPDATES/$d/updates/$y \ > ftp://$MIRROR/$WBDIR/$d/updates/$y > ##--output-file=/tmp/mirror-centos.log > > # the RPMS should be checked for valid sigs, not ready > for that yet > ##rpm --checksig $WBUPDATES/$d/updates/$y/*.rpm | grep 'NOT OK' > done > done > > > # Done > exit > > _______________________________________________ > CentOS mailing list > CentOS@xxxxxxxxxx > http://lists.centos.org/mailman/listinfo/centos > > -- > This message has been scanned for viruses and dangerous > content by MailScanner, and is believed to be clean. > > -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean.