> -----Original Message----- > From: Bill Shupp [mailto:[EMAIL PROTECTED] > Sent: Wednesday, September 22, 2004 7:17 PM > To: [EMAIL PROTECTED] > Subject: Re: [users] update-data.sh > > Darrel O'Pry wrote: > > >I ran into a problem the other day on a testing server. Apache was > >stopped on the server hosting vegaDNS, and well I lost DNS to the whole > >test bed for a little bit :). Easy enough to fix in the situation, > >restart apache and all is well, but losing dns for a bit can blow if you > >have a good number of users. I made some changes to update-data.sh to > >avoid this, kind of dirty. I was wondering if anyone else had a better > >idea, or anything I overlooked to avoid this particular problem. This > >solution will keep the original DNS for any servers that are > >unavailable. > > > > > >for VD in $VEGADNS ; do > > A=$[$A+1] > > if wget -q -O "$TINYDNSDIR/root/data.srv-$A.tmp" $VD?state=get_data; > >then > > mv $TINYDNSDIR/root/data.srv-$A.tmp $TINYDNSDIR/root/data.srv-$A > > fi > > cat "$TINYDNSDIR/root/data.srv-$A" >>$TINYDNSDIR/root/data > >done > > > >.darrel. > > > > > > Yeah, I agree there should be a check for the exit code of wget. I'll > add this to the the next release. > > But for the code above, shouldn't your "fi" be below the "cat" line? > > Bill
actually the fi is before the cat line, because hopefully there will be an old data.srv-$A since the wget failed and didn't mv the tmp to data.srv-$A. And I'd rather have out of data information from that server included in my data file than no information from that server. .darrel. -- Outgoing mail is certified Virus Free. Checked by AVG Anti-Virus (http://www.grisoft.com). Version: 7.0.269 / Virus Database: 264.9.5 - Release Date: 9/22/2004
