From 06d6df950723b1a584a6f0d91d2f681b026c8a88 Mon Sep 17 00:00:00 2001 From: Martin Edenhofer Date: Fri, 27 May 2016 00:40:27 +0200 Subject: [PATCH] Improved shutdown down. --- script/build/test_shutdown.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/script/build/test_shutdown.sh b/script/build/test_shutdown.sh index cf69f4e2a..9486c4344 100755 --- a/script/build/test_shutdown.sh +++ b/script/build/test_shutdown.sh @@ -3,10 +3,15 @@ RAILS_ENV=$1 APP_PORT=$2 WS_PORT=$3 EXIT=$4 || 0 +SERVER_PID='tmp/pids/server.pid' script/scheduler.rb stop script/websocket-server.rb stop -kill $(cat tmp/pids/server.pid) +kill $(cat $SERVER_PID) +sleep 5 +if [ -f $SERVER_PID ]; then + kill -9 $(cat $SERVER_PID) +fi rake db:drop RAILS_ENV=test rake db:drop RAILS_ENV=production