Google habe ich schon gefragt.
Dann kannst Du das folgende an Deine Bedürfnisse anpassen und danach als cronjob anlegen:
#!/bin/bash
protocol='https';
servername='example.com';
export LANG="de_DE.utf8";
cd /tmp;
umask 077;
tmpFile=$(mktemp);
wget --delete-after -mr ${protocol}://${servername} 2>&1 | grep -P "^--\d\d\d\d-\d\d-\d\d \d\d:\d\d:\d\d-- " | sed "s/^.* //" | grep -v "/autoindex-files/" | grep -v "/font/"| grep -v "/robots.txt" | grep -v "/bilder/" | grep -v "/mime-icons/" | grep -v "C=S" | grep -v "C=M" | grep -v "C=N" | grep -v "download=1" | grep -v "buttons.js" | grep -v "css.css" | grep -v "favicon.ico" | grep -v "feed.rss" | grep -v "opensearch.xml" > ${tmpFile};
tmpFileSorted=$(mktemp);
sort -u < ${tmpFile} > ${tmpFileSorted};
rm -f ${tmpFile} 2> /dev/null;
mv -f ${tmpFileSorted} /var/www/${servername}/sitemap.txt;
chmod 644 /var/www/${servername}/sitemap.txt;
gzip -cf /var/www/${servername}/sitemap.txt > /var/www/${servername}/sitemap.txt.gz;
chmod 644 /var/www/${servername}/sitemap.txt.gz;