#!/bin/sh # Script to be run periodically to construct checksums, for use # by remote sites that wish to efficiently and reliably mirror. # Mail bug reports to ehg@research.att.com # ***** EDIT THE FOLLOWING THREE LINES!!! ***** cd /usr/ftp # your anonymous ftp root directory DIRS="wondercode" # whatever you call your masterpiece PATH=/usr/ehg/bin:$PATH # so cron can find lsr and crc export PATH lsr $DIRS | crc | gzip > crc.gz chmod a+r crc.gz # If you don't have gzip or compress, use # lsr wondercode | crc > crc # If there are specific files you don't want mirrored, exclude as in # lsr $DIRS | grep -v 'Old' | crc | gzip > crc.gz # If reading all the bytes nightly seems excessive, # use the following more efficient strategy: # lsr -t $DIRS | sort -u > /tmp/crc$$ # masterslave -i /tmp/crc$$ crc.gz > /tmp/crc || exit 1 # gzip -f < /tmp/crc > crc.gz && rm /tmp/crc$$ /tmp/crc # chmod a+r crc.gz # If you do this, I recommend "lsr $DIRS | crc | gzip > crc.gz" # now and every so often (annually?). Disks do rot.