Created
February 13, 2015 12:19
-
-
Save itsprdp/0f33c0ad6668defad80f to your computer and use it in GitHub Desktop.
Delayed Job Upstart Script (Capistrano)
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
# Ubuntu upstart file at /etc/init/service.conf | |
pre-start script | |
mkdir -p /var/log/"#{fetch: application_name}"/ | |
end script | |
respawn | |
respawn limit 15 5 | |
start on runlevel [2345] | |
stop on runlevel [06] | |
script | |
su - "#{fetch: user}" -c "RAILS_ENV=#{Rails.env} bundle exec bin/delayed_job start > 2>&1" >> /var/log/"#{fetch: application_name}"/delayed_job.log | |
end script |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment