Skip to content

Commit

Permalink
Added md5 check on sample app
Browse files Browse the repository at this point in the history
  • Loading branch information
obino committed Sep 20, 2017
1 parent 8187487 commit 6db18fa
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
1 change: 1 addition & 0 deletions md5sums.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
b8cb9420f370ac0ce6f5a19ef1d0cec8 /root/guestbook.tar.gz
10 changes: 9 additions & 1 deletion scripts/fast-start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ APPSCALE_UPLOAD="$(which appscale-upload-app)"
GOOGLE_METADATA="http://169.254.169.254/computeMetadata/v1/instance/"
GUESTBOOK_URL="https://www.appscale.com/wp-content/uploads/2017/09/guestbook.tar.gz"
GUESTBOOK_APP="/root/guestbook.tar.gz"
MD5_SUMS="md5sums.txt"
USE_DEMO_APP="Y"
FORCE_PRIVATE="N"
AZURE_METADATA="http://169.254.169.254/metadata/v1/InstanceInfo"
Expand Down Expand Up @@ -241,7 +242,14 @@ if [ ! -e AppScalefile ]; then
if [ ! -e ${GUESTBOOK_APP} ]; then
echo -n "Downloading sample app..."
${CURL} -Lso ${GUESTBOOK_APP} ${GUESTBOOK_URL}
echo "done."
if ! md5sum -c ${MD5_SUMS} ; then
echo "failed to get sample app (md5 check failed)!"
echo "Removing sample app tarball and disabling starts of sample app."
rm -f ${GUESTBOOK_APP}
USE_DEMO_APP="N"
else
echo "done."
fi
fi
else
# If AppScalefile is present, do not redeploy the demo app.
Expand Down

0 comments on commit 6db18fa

Please sign in to comment.