Improved output for starting/stopping.
This commit is contained in:
parent
a8505ed5dd
commit
1f0ee62fbf
1 changed files with 6 additions and 3 deletions
|
@ -59,11 +59,11 @@ if ARGV[0] != 'start' && ARGV[0] != 'stop'
|
||||||
exit
|
exit
|
||||||
end
|
end
|
||||||
|
|
||||||
puts "Starting websocket server on #{@options[:b]}:#{@options[:p]} (secure:#{@options[:s]},pid:#{@options[:i]})"
|
|
||||||
#puts options.inspect
|
|
||||||
|
|
||||||
if ARGV[0] == 'stop'
|
if ARGV[0] == 'stop'
|
||||||
|
|
||||||
|
puts "Stopping websocket server (pid:#{@options[:i]})"
|
||||||
|
#puts options.inspect
|
||||||
|
|
||||||
# read pid
|
# read pid
|
||||||
pid = File.open( @options[:i].to_s ).read
|
pid = File.open( @options[:i].to_s ).read
|
||||||
pid.gsub!(/\r|\n/, '')
|
pid.gsub!(/\r|\n/, '')
|
||||||
|
@ -74,6 +74,9 @@ if ARGV[0] == 'stop'
|
||||||
end
|
end
|
||||||
if ARGV[0] == 'start' && @options[:d]
|
if ARGV[0] == 'start' && @options[:d]
|
||||||
|
|
||||||
|
puts "Starting websocket server on #{@options[:b]}:#{@options[:p]} (secure:#{@options[:s]},pid:#{@options[:i]})"
|
||||||
|
#puts options.inspect
|
||||||
|
|
||||||
Daemons.daemonize
|
Daemons.daemonize
|
||||||
|
|
||||||
# create pid file
|
# create pid file
|
||||||
|
|
Loading…
Reference in a new issue