#!/bin/csh -f #H# This script runs my SQLdump.pl script to generate a new data file for #H# tinydns. Then it calls tinydns-data to convert that text file into the #H# cdb hash that tinydns actually uses. #H# The hash file is then copied over to my secondary server and the temp #H# text file is deleted. # Stick a warning in the top of the text file to make sure nobody ever edits # it. I guess I don't really need to do this since I delete the file at the # end of the script BUT since editing the data file is the standard djb way # to do things I figured a warning header was in order. cp -f .warning.txt data || exec echo "ERROR: cannot write data file" echo "Dumping data from MySQL..." /service/tinydns/root/SQLdump.pl >> data tinydns-data || exec echo "ERROR: tinydns-data blew up." echo "Updateing norad..." scp -p data.cdb norad.futurequest.net:/service/tinydns/root/ echo "Cleaning up..." /bin/rm -f data