Skip to content

Instantly share code, notes, and snippets.

@pedro108
Created March 2, 2016 14:11
Show Gist options
  • Save pedro108/bd9610c38fd840010dfe to your computer and use it in GitHub Desktop.
Save pedro108/bd9610c38fd840010dfe to your computer and use it in GitHub Desktop.
Runs RVM startup script, and execute a bundle exec task for Monit
#!/bin/bash
export rvm_path=/home/ubuntu/.rvm;
. $rvm_path/scripts/rvm;
eval "su - ubuntu -c 'cd #{absolute_path_to_rails_app_root}; RAILS_ENV=production bundle exec $@'"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment