Improved shutdown down.

This commit is contained in:
Martin Edenhofer 2016-05-27 00:40:27 +02:00
parent 39feeccc88
commit 06d6df9507

View file

@ -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