Skip to content

Instantly share code, notes, and snippets.

@benders
Created July 12, 2009 23:00
Show Gist options
  • Save benders/145826 to your computer and use it in GitHub Desktop.
Save benders/145826 to your computer and use it in GitHub Desktop.
# -*- ruby -*-
God.watch do |w|
w.name = "couchdb"
w.interval = 10.seconds
w.start = "su - couchdb -s /bin/bash -c '/usr/local/bin/couchdb -b'"
w.stop = "su - couchdb -s /bin/bash -c '/usr/local/bin/couchdb -d'"
w.pid_file = "/usr/local/var/run/couchdb.pid"
# clean pid files before start if necessary
w.behavior(:clean_pid_file)
start_if_needed( w )
mark_as_up_when_running( w )
start_if_not_running( w )
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment