Created
November 29, 2012 07:08
-
-
Save bastman/4167313 to your computer and use it in GitHub Desktop.
deploylv.sh
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 | |
echo "#########################################################" | |
echo "# WARNING: YOU ARE ABOUT TO UPDATE THE __LIVE__ SYSTEM! #" | |
echo "#########################################################" | |
echo | |
echo -n "Please type in YES to continue: " | |
read CHECK | |
if test "$CHECK" == "YES" | |
then | |
echo -n "OK .. last chance to CTRL-C! ABOUT TO PROCEED IN: 5" | |
else | |
echo "... CANCELLED!" | |
exit | |
fi | |
sleep 2s; echo -n " 4"; | |
sleep 2s; echo -n " 3"; | |
sleep 2s; echo -n " 2"; | |
sleep 2s; echo -n " 1"; | |
sleep 2s; echo " GO!" | |
CMD_DIR=`dirname $0` | |
ssh [email protected] ' | |
cd deploy ; | |
./deploy_app.sh ; | |
cd /home/www/htdocs/app.example.com/app_foo/bin ; | |
./run_task.php Compile -j -c ; | |
cd ; | |
bin/sync_system.sh' | |
echo -n "Please type in YES to regenerate avz API: " | |
read CHECK | |
if test "$CHECK" == "YES" | |
then | |
curl --user-agent foo 'http://app.example.com/API.php?generate=true' | |
fi | |
echo -n "Please type in YES to regenerate API: " | |
read CHECK | |
if test "$CHECK" == "YES" | |
then | |
curl --user-agent foo 'http://app.example.com/API.php?generate=true' | |
fi | |
exit | |
# eof |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment