Created
June 5, 2012 21:01
-
-
Save justinholmes/2877877 to your computer and use it in GitHub Desktop.
Deployment script on remote server
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 | |
unzip -o filename-1.0 | |
chmod a+x filename-1.0/start | |
gline=$(ps -ewwo pid,args | grep "play.core.server.NettyServer") | |
echo $gline | |
IN=$gline | |
set -- "$IN" | |
IFS=" "; declare -a Array=($*) | |
PlayProcess="$(ps -ewwo pid,args | grep "play.core.server.NettyServer")" | |
echo $PlayProcess | |
condition="" | |
if [[ $PlayProcess != $condition ]] | |
then | |
echo "Killing process: ${Array[0]}" | |
kill ${Array[0]} | |
fi | |
nohup ./filename-1.0/start & ## OR other deployment methods | |
exit |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment