From 1f0ee62fbf9a5bf9b5975a9e7d0e2a0696cf8d25 Mon Sep 17 00:00:00 2001 From: Martin Edenhofer Date: Thu, 16 Jul 2015 21:56:54 +0200 Subject: [PATCH] Improved output for starting/stopping. --- script/websocket-server.rb | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/script/websocket-server.rb b/script/websocket-server.rb index 578b4fdcf..c2bd17aa7 100755 --- a/script/websocket-server.rb +++ b/script/websocket-server.rb @@ -59,11 +59,11 @@ if ARGV[0] != 'start' && ARGV[0] != 'stop' exit end -puts "Starting websocket server on #{@options[:b]}:#{@options[:p]} (secure:#{@options[:s]},pid:#{@options[:i]})" -#puts options.inspect - if ARGV[0] == 'stop' + puts "Stopping websocket server (pid:#{@options[:i]})" + #puts options.inspect + # read pid pid = File.open( @options[:i].to_s ).read pid.gsub!(/\r|\n/, '') @@ -74,6 +74,9 @@ if ARGV[0] == 'stop' end 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 # create pid file