Created
October 6, 2011 08:28
-
-
Save foliosus/1266849 to your computer and use it in GitHub Desktop.
Upstart script to run delayed_job, with a weird rvm hack
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
# /etc/init/delayed_job.conf | |
# Note that you have to modify script/delayed_job's shebang line to have the correct ruby path | |
description "Delayed_job for a Rails app" | |
author "Brent Miller <foliosus@foliosus.com>" | |
start on started mysql | |
stop on stopping mysql | |
respawn | |
exec su deployer -c '/usr/local/rvm/bin/rvm && cd /home/deployer/app/current && script/delayed_job run RAILS_ENV=production >> /home/deployer/app/current/log/delayed_job.log 2>&1' |
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
# /etc/sudoers.d/restart | |
# This file needs to be chmod 0440 | |
deployer ALL = (root) NOPASSWD:NOEXEC: /sbin/restart |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Store this in /etc/init. Works on Ubuntu 11.04 natty.