slitaz-pizza diff pizza-bot @ rev 75

pizza-bot: sendmail to Admin when new flavor is built
author Eric Joseph-Alexandre <erjo@slitaz.org>
date Sun Nov 11 11:20:44 2012 +0100 (2012-11-11)
parents a623eba88ed3
children 38d3a05db9e3
line diff
     1.1 --- a/pizza-bot	Thu Nov 01 13:25:53 2012 +0100
     1.2 +++ b/pizza-bot	Sun Nov 11 11:20:44 2012 +0100
     1.3 @@ -144,6 +144,12 @@
     1.4  			mail_body | /usr/bin/sendmail -f $MAIL_FROM $MAINTAINER
     1.5  		fi
     1.6  		
     1.7 +		# Notify Admin if enabled.
     1.8 +		if [ "$MAIL_ADMIN" ]; then
     1.9 +			echo "Sending mail to: $MAIL_ADMIN"
    1.10 +			echo "$(date '+%a, %d %b %Y %H:%M:%S %z') New flavor built on Pizza: ${PIZZA_URL}?id=$ID " | /usr/bin/sendmail -f $MAIL_FROM $MAIL_ADMIN
    1.11 +		fi
    1.12 +		
    1.13  		# Count builds
    1.14  		count=$(cat $builds)
    1.15  		count=$(($count + 1))