Skip to content

Instantly share code, notes, and snippets.

@Aracki
Last active April 13, 2017 11:52
Show Gist options
  • Save Aracki/99284ff80365d05c6c1574b76cc4af31 to your computer and use it in GitHub Desktop.
Save Aracki/99284ff80365d05c6c1574b76cc4af31 to your computer and use it in GitHub Desktop.
script for deploying
#! /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