Created
May 25, 2011 18:34
-
-
Save psndcsrv/991583 to your computer and use it in GitHub Desktop.
daemon_controller starting passenger
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
require 'rubygems' | |
require 'daemon_controller' | |
require 'socket' | |
ROOT = File.expand_path(File.dirname(__FILE__)) | |
d = DaemonController.new( | |
:identifier => "Rails Backend", | |
:start_command => "passenger start -d -e test -p 3000", | |
:ping_command => lambda { TCPSocket.new('localhost', 3000)}, | |
:pid_file => "#{ROOT}/rails/geniverse/passenger.3000.pid", | |
:log_file => "#{ROOT}/rails/geniverse/passenger.3000.log", | |
:timeout => 25 | |
) | |
d.start | |
puts "started" | |
d.stop |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment