#/bin/bash
site=$1
oldmd5=""
echo scanning fifo.$site
while [ 1 ] ; do 
	read file < fifo.$site
	md5=$(md5sum "$file" | cut -c1-32)
	if [ "$oldmd5" != "$md5" ] ; then
		/home/mick/bin/sync_static.php $site "$file" $md5
		oldmd5=$md5
	fi
done

