Skip to content

Instantly share code, notes, and snippets.

@retr0h
Created September 6, 2008 22:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save retr0h/9203 to your computer and use it in GitHub Desktop.
Save retr0h/9203 to your computer and use it in GitHub Desktop.
##
# Start daemons.
config.after_initialize do
unless $0.match(/rake/) or (defined? DaemonMemcache and DaemonMemcache.instance.running?)
DaemonMemcache.instance.start rescue nil
at_exit do
DaemonMemcache.instance.stop rescue nil
end
end
end
### Trackback: http://geminstallthat.wordpress.com/2008/09/06/controlling-memcached-with-phusions-daemon_controller/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment