Last active
April 13, 2017 11:52
-
-
Save Aracki/99284ff80365d05c6c1574b76cc4af31 to your computer and use it in GitHub Desktop.
script for deploying
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/bash | |
git pull origin master \ | |
&& ./gradlew build \ | |
&& kill -9 `ps -ef | grep java | grep -v grep | awk '{print $2}'` | |
function isServiceLive { | |
running=0; | |
while [ $running -eq 0 ]; do | |
if [ "$response" != "Web service is working!" ]; then | |
sleep 1; | |
response=$(curl -s "https://tonicdm.com/status"); | |
else | |
echo "===" $response "==="; | |
running=1; | |
fi | |
done | |
} | |
isServiceLive |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment