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
