From: Holger Levsen Date: Fri, 23 Nov 2012 14:31:06 +0000 (+0100) Subject: liveboot-testdeploy: don't deploy if mail is missing. DEVINF-253 X-Git-Url: https://git.uhu-banane.org/?a=commitdiff_plain;h=12379db8c6809777d4ac3ee499ea57e3c10e2275;p=profitbricks%2Fjenkins-build-scripts.git liveboot-testdeploy: don't deploy if mail is missing. DEVINF-253 --- diff --git a/liveboot_testdeploy.sh b/liveboot_testdeploy.sh index aef16e8..5b7e971 100755 --- a/liveboot_testdeploy.sh +++ b/liveboot_testdeploy.sh @@ -37,6 +37,13 @@ else exit 1 fi +MAIL=$SOURCE_DIR/mail.txt +if [ ! -e $MAIL ] ; then + figlet "Warning:" + echo "$MAIL does not exist, something wrong with the liveboot web UI or was it simply not used at all?" + exit 1 +fi + # # reconfigure PXE to make $TESTSERVER boot this image # @@ -115,12 +122,6 @@ echo # # send announce mail # -MAIL=$SOURCE_DIR/mail.txt -if [ ! -e $MAIL ] ; then - figlet "Warning:" - echo "$MAIL does not exist, something wrong with liveboot-web?" - exit 1 -fi mailtextbody < $MAIL ; echo cat $MAIL | /usr/sbin/sendmail -t echo