Skip to content

Instantly share code, notes, and snippets.

@bastman
Created November 29, 2012 07:08
Show Gist options
  • Save bastman/4167313 to your computer and use it in GitHub Desktop.
Save bastman/4167313 to your computer and use it in GitHub Desktop.
deploylv.sh
#!/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