From 54465456845ab83a161c9bede172a14988640603 Mon Sep 17 00:00:00 2001 From: zedshaw Date: Tue, 8 Aug 2006 09:25:16 +0000 Subject: Fixes the confusion in the PID and log file settings. git-svn-id: svn+ssh://rubyforge.org/var/svn/mongrel/trunk@310 19e92222-5c0b-0410-8929-a290d50e31e9 --- bin/mongrel_rails | 5 ++--- lib/mongrel/configurator.rb | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/bin/mongrel_rails b/bin/mongrel_rails index d2c7b2b..310ee6e 100644 --- a/bin/mongrel_rails +++ b/bin/mongrel_rails @@ -167,7 +167,7 @@ class Stop < GemPlugin::Plugin "/commands" options [ ['-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"] + ['-P', '--pid FILE', "Where the PID file is located", :@pid_file, "log/mongrel.pid"] ] end @@ -175,7 +175,6 @@ class Stop < GemPlugin::Plugin "/commands" 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 valid_exists? @pid_file, "PID file #@pid_file does not exist. Not running?" @@ -202,7 +201,7 @@ class Restart < GemPlugin::Plugin "/commands" options [ ['-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"] + ['-P', '--pid FILE', "Where the PID file is located", :@pid_file, "log/mongrel.pid"] ] end diff --git a/lib/mongrel/configurator.rb b/lib/mongrel/configurator.rb index e7af9a9..cd4ca9a 100644 --- a/lib/mongrel/configurator.rb +++ b/lib/mongrel/configurator.rb @@ -172,7 +172,7 @@ module Mongrel if RUBY_PLATFORM !~ /mswin/ require 'daemons/daemonize' - Daemonize.daemonize(log_file=File.join(ops[:cwd], ops[:log_file])) + Daemonize.daemonize(log_file=ops[:log_file]) # change back to the original starting directory Dir.chdir(ops[:cwd]) -- cgit v1.2.3-24-ge0c7