Subject: processlog.sh [1085]

From: [email-masked] (Dave Williss)
Date: Wed, 11 Jan 1995 08:57:26 -0600 (CST)

#!/bin/sh
#
#	This script is ment to be run by root in it's crontab
#	It runs dumpxfer and mails the output to a list of
#	users.  It also moves the log to a LOGS subdirectory
#	and renames it with todays date.
#
#	Feel free to change and/or distribute this script
#
#		Dave Williss
#		[email-masked]
#

# Who to send normal reports to 
good_email="dwilliss,ssizer,peterson"

# Who to send special reports to about bad transfers 
bad_email="dwilliss"

# Open log, deleting old entries
xferlog="/usr/local/etc/wu-ftpd/xferlog"
newfile="/usr/local/etc/wu-ftpd/LOGS/`date +%y%m%d`"
outfilename="/tmp/dumpxfer.log.$$"

echo $newfile
cat $xferlog >> $newfile
rm $xferlog
touch $xferlog

/usr/local/bin/dumpxfer -aS -f $newfile > $outfilename
if [ -s $outfilename ] ; then
	/usr/lib/sendmail $good_email < $outfilename
	fi
rm $outfilename

/usr/local/bin/dumpxfer -bS -f $newfile > $outfilename
if [ -s $outfilename ] ; then
	/usr/lib/sendmail $bad_email < $outfilename
	fi
rm $outfilename;