slitaz-pizza 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 | 340eae2ec334 |
children | 38d3a05db9e3 |
files | pizza-bot pizza.conf |
line diff
1.1 --- a/pizza-bot Sun Nov 11 08:48:08 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))
2.1 --- a/pizza.conf Sun Nov 11 08:48:08 2012 +0100 2.2 +++ b/pizza.conf Sun Nov 11 11:20:44 2012 +0100 2.3 @@ -27,6 +27,7 @@ 2.4 MAIL_DOMAIN="slitaz.me" 2.5 MAIL_SERVER="127.0.0.1" 2.6 MAIL_FROM="pizza@slitaz.org" 2.7 +MAIL_ADMIN="erjo@slitaz.org" 2.8 2.9 # Local packages synced from a mirror 2.10 RSYNC_PKGS="rsync://mirror.slitaz.org/slitaz-$SLITAZ_VERSION/"