Last active
February 8, 2017 13:09
-
-
Save avdept/696741cde96c6c53c9711910d81361f0 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
#!/bin/sh -e | |
# upstart-job | |
# Put file into /etc/init.d | |
# Service available as sudo service {filename} start | |
# Make sure you chmod +x file | |
# To add service to auto start -> sudo update-rc.d {filename} defaults | |
echo "starting unicorn after reboot" | |
exec sudo -u ubuntu bash -c "cd /home/ubuntu/apps/app_name/prod/current && ~/.rvm/bin/rvm default do bundle exec unicorn_rails -c /home/ubuntu/apps/app_name/prod/current/config/unicorn/production.rb -E production -D" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment