18 lines
451 B
Plaintext
18 lines
451 B
Plaintext
|
#!/bin/sh
|
||
|
|
||
|
DATE=`date +"%Y%m%d"`
|
||
|
OUTPUTDIR=$HOME/public_html/classpath/daily
|
||
|
LOGFILE=$OUTPUTDIR/classpath-$DATE.log
|
||
|
FAILEDLOG=$OUTPUTDIR/classpath-failed-$DATE.log
|
||
|
MAIL="konqueror@gmx.de"
|
||
|
|
||
|
/home/mkoch/bin/classpath-build
|
||
|
|
||
|
if test "$?" = "1" ; then
|
||
|
tail --lines=100 $LOGFILE > $FAILEDLOG
|
||
|
|
||
|
mail $MAIL -s "classpath daily snapshot $DATE FAILED" < $FAILEDLOG
|
||
|
else
|
||
|
mail $MAIL -s "classpath daily snapshot $DATE SUCCESSFUL" < /dev/null > /dev/null
|
||
|
fi
|