From 3e78ac52bb7784af71b3af32131876ddc2b36ed4 Mon Sep 17 00:00:00 2001 From: Holger Levsen Date: Thu, 8 Nov 2012 13:57:55 +0100 Subject: [PATCH] send mail too --- liveboot_testdeploy.sh | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) 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)" -- 2.39.5