Methods
Public Class methods
description()
    # File lib/phusion_passenger/standalone/status_command.rb, line 29
29:         def self.description
30:                 return "Show the status of a running Passenger Standalone instance."
31:         end
Public Instance methods
run()
    # File lib/phusion_passenger/standalone/status_command.rb, line 33
33:         def run
34:                 parse_options!("status") do |opts|
35:                         opts.on("-p", "--port NUMBER", Integer,
36:                                 wrap_desc("The port number of a Phusion Passenger Standalone instance (default: #{@options[:port]})")) do |value|
37:                                 @options[:port] = value
38:                         end
39:                         opts.on("--pid-file FILE", String,
40:                                 wrap_desc("PID file of a running Phusion Passenger Standalone instance.")) do |value|
41:                                 @options[:pid_file] = value
42:                         end
43:                 end
44:                 
45:                 determine_various_resource_locations(false)
46:                 create_nginx_controller
47:                 begin
48:                         running = @nginx.running?
49:                         pid = @nginx.pid
50:                 rescue SystemCallError, IOError
51:                         running = false
52:                 end
53:                 if running
54:                         puts "Phusion Passenger Standalone is running on PID #{pid}, according to PID file #{@options[:pid_file]}"
55:                 else
56:                         puts "Phusion Passenger Standalone is not running, according to PID file #{@options[:pid_file]}"
57:                 end
58:         end