Skip to content

Instantly share code, notes, and snippets.

@shankarcabus
Created May 6, 2014 16:51
Show Gist options
  • Save shankarcabus/9f4dedced8016652f8ec to your computer and use it in GitHub Desktop.
Save shankarcabus/9f4dedced8016652f8ec to your computer and use it in GitHub Desktop.
Workon
#!/bin/bash
echo "Restarting VirtualBox"
sudo /Library/StartupItems/VirtualBox/VirtualBox restart
echo "Starting vagrant [lb, webnode, testsuite]"
cd ~/git/jusbrasil-webpy/resources
vagrant halt -f; vagrant up
echo "Activating virtualenv"
source ~/osxenv/bin/activate
cd ~/git/jusbrasil-webpy
echo "SSH to webnode"
cd resources
vagrant ssh webnode --command 'sudo supervisorctl start all; sudo supervisorctl stop gunicorn; source /webapp/env/bin/activate; cd /webapp/latest; python manage.py runserver'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment