about summary refs log tree commit homepage
path: root/lib
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2010-06-10 21:45:54 +0000
committerEric Wong <normalperson@yhbt.net>2010-06-10 22:08:00 +0000
commitee0088ea9906701f0c89e89ce78acd9d4820ee65 (patch)
tree979d21bfb1f5cb55561b4b57f49469ccbf3f5e86 /lib
parent5e8979ad38efdc4de3a69cc53aea33710d478406 (diff)
downloadunicorn-ee0088ea9906701f0c89e89ce78acd9d4820ee65.tar.gz
Diffstat (limited to 'lib')
-rw-r--r--lib/unicorn/configurator.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/unicorn/configurator.rb b/lib/unicorn/configurator.rb
index 0716e64..b1a317e 100644
--- a/lib/unicorn/configurator.rb
+++ b/lib/unicorn/configurator.rb
@@ -59,6 +59,9 @@ module Unicorn
 
       parse_rackup_file
 
+      # unicorn_rails creates dirs here after working_directory is bound
+      after_reload.call if after_reload
+
       # working_directory binds immediately (easier error checking that way),
       # now ensure any paths we changed are correctly set.
       [ :pid, :stderr_path, :stdout_path ].each do |var|
@@ -67,9 +70,6 @@ module Unicorn
         File.writable?(path) || File.writable?(File.dirname(path)) or \
               raise ArgumentError, "directory for #{var}=#{path} not writable"
       end
-
-      # unicorn_rails creates dirs here after working_directory is bound
-      after_reload.call if after_reload
     end
 
     def commit!(server, options = {}) #:nodoc:
@@ -456,7 +456,7 @@ module Unicorn
 
       if daemonize
         # unicorn_rails wants a default pid path, (not plain 'unicorn')
-        if ru == :rails
+        if after_reload
           spid = set[:pid]
           pid('tmp/pids/unicorn.pid') if spid.nil? || spid == :unset
         end