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)"