# HG changeset patch # User Eric Joseph-Alexandre # Date 1352629244 -3600 # Node ID e390bf08c5b08963f14197423062fa6dcad9bf4d # Parent 340eae2ec334c027087bd2210d0df1a561c299d3 pizza-bot: sendmail to Admin when new flavor is built diff -r 340eae2ec334 -r e390bf08c5b0 pizza-bot --- a/pizza-bot Sun Nov 11 08:48:08 2012 +0100 +++ b/pizza-bot Sun Nov 11 11:20:44 2012 +0100 @@ -144,6 +144,12 @@ mail_body | /usr/bin/sendmail -f $MAIL_FROM $MAINTAINER fi + # Notify Admin if enabled. + if [ "$MAIL_ADMIN" ]; then + echo "Sending mail to: $MAIL_ADMIN" + 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 + fi + # Count builds count=$(cat $builds) count=$(($count + 1)) diff -r 340eae2ec334 -r e390bf08c5b0 pizza.conf --- a/pizza.conf Sun Nov 11 08:48:08 2012 +0100 +++ b/pizza.conf Sun Nov 11 11:20:44 2012 +0100 @@ -27,6 +27,7 @@ MAIL_DOMAIN="slitaz.me" MAIL_SERVER="127.0.0.1" MAIL_FROM="pizza@slitaz.org" +MAIL_ADMIN="erjo@slitaz.org" # Local packages synced from a mirror RSYNC_PKGS="rsync://mirror.slitaz.org/slitaz-$SLITAZ_VERSION/"