1
0
Fork 0
mirror of https://github.com/puma/puma.git synced 2022-11-09 13:48:40 -05:00

fixed ps for status, default path for pids

git-svn-id: svn+ssh://rubyforge.org/var/svn/mongrel/trunk@523 19e92222-5c0b-0410-8929-a290d50e31e9
This commit is contained in:
bktaylor 2007-02-21 16:14:14 +00:00
parent df87329120
commit 3f82dfd23b
2 changed files with 4 additions and 4 deletions

View file

@ -101,7 +101,7 @@ module Cluster
@ports.each do |port|
pid_file = port_pid_file(port)
puts "Removing {pid_file}!" if @verbose
puts "Removing #{pid_file}!" if @verbose
File.unlink(pid_file) if File.exists?(pid_file)
end
@ -118,7 +118,7 @@ module Cluster
pid_file = port_pid_file(port)
if File.exists?(pid_file)
pid = File.read(pid_file)
ps_output = `ps -o cmd= -p #{pid}`
ps_output = `ps -o command= -p #{pid}`
status = STATUS_MISSING unless (ps_output =~ /mongrel_rails/)
msg = status == STATUS_OK ? "Found dog: #{port}" : "Lost dog: #{port}"
else
@ -196,7 +196,7 @@ module Cluster
['-p', '--port PORT', "Starting port to bind to", :@port, 3000],
['-a', '--address ADDR', "Address to bind to", :@address, nil],
['-l', '--log FILE', "Where to write log messages", :@log_file, nil],
['-P', '--pid FILE', "Where to write the PID", :@pid_file, "log/mongrel.pid"],
['-P', '--pid FILE', "Where to write the PID", :@pid_file, "tmp/pids/mongrel.pid"],
['-c', '--chdir PATH', "Change to dir before starting (will be expanded)", :@cwd, nil],
['-t', '--timeout SECONDS', "Timeout all requests after SECONDS time", :@timeout, nil],
['-m', '--mime PATH', "A YAML file that lists additional MIME types", :@mime_map, nil],

View file

@ -39,7 +39,7 @@ case "$1" in
RETVAL=$?
;;
status)
mongrel_cluster_ctl restart -c $CONF_DIR
mongrel_cluster_ctl status -c $CONF_DIR
RETVAL=$?
;;
*)