From d5b23a5a61568e51ca89adfc86d0f42fd27cee5d Mon Sep 17 00:00:00 2001 From: zedshaw Date: Fri, 11 Aug 2006 18:46:33 +0000 Subject: Fixes bug where PID file not written when in config file. Improves error messages as well. git-svn-id: svn+ssh://rubyforge.org/var/svn/mongrel/trunk@312 19e92222-5c0b-0410-8929-a290d50e31e9 --- bin/mongrel_rails | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'bin') diff --git a/bin/mongrel_rails b/bin/mongrel_rails index 310ee6e..dd90356 100644 --- a/bin/mongrel_rails +++ b/bin/mongrel_rails @@ -69,6 +69,7 @@ class Start < GemPlugin::Plugin "/commands" :user => @user, :group => @group, :prefix => @prefix } + if @generate STDERR.puts "** Writing config to #@generate" open(@generate, "w") {|f| f.write(settings.to_yaml) } @@ -77,9 +78,9 @@ class Start < GemPlugin::Plugin "/commands" end if @config_file - STDERR.puts "** Loading settings from #{@config_file} (they override command line)." unless settings[:daemon] conf = YAML.load_file(@config_file) settings = settings.merge! conf + STDERR.puts "** Loading settings from #{@config_file} (they override command line)." unless settings[:daemon] end config = Mongrel::Rails::RailsConfigurator.new(settings) do @@ -127,10 +128,10 @@ class Start < GemPlugin::Plugin "/commands" config.run config.log "Mongrel available at #{settings[:host]}:#{settings[:port]}" - if not @daemon - config.log "Use CTRL-C to stop." - else + if config.defaults[:daemon] config.write_pid_file + else + config.log "Use CTRL-C to stop." end config.join -- cgit v1.2.3-24-ge0c7