Gallery Sitemap Problem
For some reason (probably because of the size of my gallery and the number of sites hosted on the box) I’ve been having problems with Google being able to pull an XML sitemap for the gallery. Google was apparantly timing out while attempting to download it. I’m not sure if some change was made on their end recently regarding the length of time which could be spend during sitemap downloads or what, but I think I found a solution:
#!/bin/sh
newfile=~/www/nuxx.net/gallery/sitemap.xml.new
oldfile=~/www/nuxx.net/gallery/sitemap.xml/usr/local/bin/curl -Sso $newfile http://nuxx.net/gallery/main.php?g2_view=sitemap.Sitemap
if [ -d ~/www/nuxx.net/gallery/sitemap.xml.new ]; then
mv $newfile $oldfile
fi
Yes, I know it’s a hack, but running it every six hours should work around the problem.
UPDATE: Yep, I just realized this won’t work. The test argument needs to be changed to -f (or -e) because it’s not a directory. Doh!