From: Holger Levsen Date: Thu, 8 Nov 2012 12:57:55 +0000 (+0100) Subject: send mail too X-Git-Url: https://git.uhu-banane.de/?a=commitdiff_plain;h=3e78ac52bb7784af71b3af32131876ddc2b36ed4;p=profitbricks%2Fjenkins-build-scripts.git send mail too --- diff --git a/liveboot_testdeploy.sh b/liveboot_testdeploy.sh index f5e99fa..78a2948 100755 --- a/liveboot_testdeploy.sh +++ b/liveboot_testdeploy.sh @@ -33,19 +33,28 @@ ping -c 1 $TESTSERVER || true for i in $(seq 1 10) ; do sleep 60 - if [ $(ping -c 1 $TESTSERVER) ] ; then + if $(ping -c 1 $TESTSERVER >/dev/null) ; then break fi done -if [ $(ping -c 1 $TESTSERVER) ] ; then - figlet Ok - echo "$TESTSERVER pings again, so we assume it's up." - echo "Please continue manual testing of $(basedir $SOURCE_DIR)" -else +if ! $(ping -c 1 $TESTSERVER >/dev/null) ; then figlet "Warning" echo "$TESTSERVER still down, please investigate." exit 1 fi - + +MAIL=$SOURCE_DIR/mail.txt +MAILTO=liveboot-announce@profitbricks.com +if [ ! -e $MAIL ] + figlet "Warning" + echo "$TESTSERVER still down, please investigate." + exit 1 +fi + +cat $MAIL | mail $MAILTO && echo "Mail to $MAILTO send." +cat $MAIL | mail holger@layer-acht.org +figlet Ok +echo "$TESTSERVER pings again, so we assume it's up." +echo "Please continue manual testing of $(basedir $SOURCE_DIR)"