about summary refs log tree commit homepage
path: root/bin
diff options
context:
space:
mode:
authorzedshaw <zedshaw@19e92222-5c0b-0410-8929-a290d50e31e9>2006-08-11 18:46:33 +0000
committerzedshaw <zedshaw@19e92222-5c0b-0410-8929-a290d50e31e9>2006-08-11 18:46:33 +0000
commitd5b23a5a61568e51ca89adfc86d0f42fd27cee5d (patch)
tree0b51becbd357b824d92ad10645d84254fddc79e4 /bin
parentee675d5a703efaab60ef90a8b41f87348d928db7 (diff)
downloadunicorn-d5b23a5a61568e51ca89adfc86d0f42fd27cee5d.tar.gz
git-svn-id: svn+ssh://rubyforge.org/var/svn/mongrel/trunk@312 19e92222-5c0b-0410-8929-a290d50e31e9
Diffstat (limited to 'bin')
-rw-r--r--bin/mongrel_rails9
1 files changed, 5 insertions, 4 deletions
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