Skip to content

Instantly share code, notes, and snippets.

@clemente
Last active October 10, 2017 10:40
Show Gist options
  • Select an option

  • Save clemente/c4e0ebc28213e0aa41c9d87fd6c693e5 to your computer and use it in GitHub Desktop.

Select an option

Save clemente/c4e0ebc28213e0aa41c9d87fd6c693e5 to your computer and use it in GitHub Desktop.
Command to connect to openedx and auto-start screen with LMS and forum inside
A command I use to reconnect to openedx vagrant box every time vagrant hangs (that is, every time I hibernate and resume my computer; https://www.virtualbox.org/ticket/14374 )
It also opens some things inside the VM and auto-starts LMS and forum.
Still testing, might not work 100%.
```
function vagrant-reconnect-after-hang () {
vagrant halt && vagrant up && vagrant ssh -c "screen -AmdS test2; screen -S test2 -p 0 -X stuff $'sudo su edxapp\rpaver devstack lms\r'; screen -S test2 -X screen; screen -S test2 -p 1 -X stuff $'sudo su forum\rbundle install && ruby app.rb -p 18080\r'; screen -S test2 -X screen; screen -S test2 -p 2 -X stuff $'sudo su edxapp\rcd ../themes\r'; screen -S test2 -r"
}
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment