Created
January 14, 2013 23:03
-
-
Save 2called-chaos/4534381 to your computer and use it in GitHub Desktop.
Start rails application on startup. Insert this into /etc/rc.local before the line "exit 0" (do not remove the shebang/1st line either). Change basepath and webuser respectively.
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
# Insert this into /etc/rc.local before the line "exit 0" (do not remove the shebang/1st line either) | |
# Change basepath and webuser respectively. | |
rails_start() { screen -md su - www-data -c "cd /home/www/$1/current ; bundle exec unicorn -c config/unicorn.rb -E production -D"; } | |
rails_start "com.example" | |
rails_start "some_app" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment