From f236812e152e4b53934c7049973460b223f14778 Mon Sep 17 00:00:00 2001 From: zedshaw Date: Mon, 5 Jun 2006 09:35:34 +0000 Subject: Fixes bugs 4658, 4478, 4402, and minor fix for the katana killer concurrency change. git-svn-id: svn+ssh://rubyforge.org/var/svn/mongrel/trunk@227 19e92222-5c0b-0410-8929-a290d50e31e9 --- bin/mongrel_rails | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'bin') diff --git a/bin/mongrel_rails b/bin/mongrel_rails index 38ec96c..6eae4bc 100644 --- a/bin/mongrel_rails +++ b/bin/mongrel_rails @@ -57,10 +57,6 @@ class Start < GemPlugin::Plugin "/commands" valid_user? @user if @user valid_group? @group if @group - if ActionController::Base.allow_concurrency - STDERR.puts "[RAILS] allow_concurrency is true. Wow, you're very brave." - end - return @valid end @@ -164,17 +160,19 @@ class Stop < GemPlugin::Plugin "/commands" def configure options [ - ['-c', '--chdir PATH', "Change to dir before starting (will be expanded)", :@cwd, Dir.pwd], + ['-c', '--chdir PATH', "Change to dir before starting (will be expanded)", :@cwd, nil], ['-f', '--force', "Force the shutdown.", :@force, false], ['-P', '--pid FILE', "Where to write the PID", :@pid_file, "log/mongrel.pid"] ] end def validate - @cwd = File.expand_path(@cwd) - valid_dir? @cwd, "Invalid path to change to during daemon mode: #@cwd" + if @cwd + @cwd = File.expand_path(@cwd) + valid_dir? @cwd, "Invalid path to change to during daemon mode: #@cwd" + @pid_file = File.join(@cwd,@pid_file) + end - @pid_file = File.join(@cwd,@pid_file) valid_exists? @pid_file, "PID file #@pid_file does not exist. Not running?" return @valid @@ -197,17 +195,19 @@ class Restart < GemPlugin::Plugin "/commands" def configure options [ - ['-c', '--chdir PATH', "Change to dir before starting (will be expanded)", :@cwd, Dir.pwd], + ['-c', '--chdir PATH', "Change to dir before starting (will be expanded)", :@cwd, nil], ['-s', '--soft', "Do a soft restart rather than a process exit restart", :@soft, false], ['-P', '--pid FILE', "Where to write the PID", :@pid_file, "log/mongrel.pid"] ] end def validate - @cwd = File.expand_path(@cwd) - valid_dir? @cwd, "Invalid path to change to during daemon mode: #@cwd" + if @cwd + @cwd = File.expand_path(@cwd) + valid_dir? @cwd, "Invalid path to change to during daemon mode: #@cwd" + @pid_file = File.join(@cwd,@pid_file) + end - @pid_file = File.join(@cwd,@pid_file) valid_exists? @pid_file, "PID file #@pid_file does not exist. Not running?" return @valid -- cgit v1.2.3-24-ge0c7