| Class | Dctl::Command::StatusCommand |
| In: |
lib/dctl/command.rb
|
| Parent: | NonRedirectibleCommand |
# File lib/dctl/command.rb, line 102
102: def description
103: "Get the state of specified applications (one or more)."
104: end
# File lib/dctl/command.rb, line 106
106: def execute(cmd_parser, args)
107: if args.length > 0
108: args.each { |cmd| puts status(cmd) rescue puts $! }
109: else
110: Dir[File.join($DIR, '*.pid')].collect { |p| File.basename(p, '.*')}.each { |cmd| puts status(cmd) } # BUG ! if cmd not in PATH !
111: end
112: end