Skip to content

Instantly share code, notes, and snippets.

@curt
Created February 9, 2010 16:05
Show Gist options
  • Save curt/299349 to your computer and use it in GitHub Desktop.
Save curt/299349 to your computer and use it in GitHub Desktop.
Monit service entry for Rails background process
check process app_background
with pidfile "/path/to/app/shared/pids/background.pid"
start program = "/usr/bin/sudo -u user RAILS_ENV=production /usr/local/bin/ruby /path/to/app/current/background_control.rb start"
stop program = "/usr/bin/sudo -u user RAILS_ENV=production /usr/local/bin/ruby /path/to/app/current/background_control.rb stop"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment