Skip to content

Commit

Permalink
Keep the server in the foreground
Browse files Browse the repository at this point in the history
  • Loading branch information
sychan committed Nov 1, 2018
1 parent 93b579e commit c08334b
Showing 1 changed file with 0 additions and 13 deletions.
13 changes: 0 additions & 13 deletions service/start_service.template
Original file line number Diff line number Diff line change
Expand Up @@ -36,17 +36,4 @@ uwsgi --master \
--http :$port \
--http-timeout $http_timeout \
--pidfile $pid_file \
--daemonize $KB_SERVICE_DIR/error.log \
--wsgi-file $wsgi_file

echo "$KB_SERVICE_NAME started on port $port."
echo "Errors are logged to: $KB_SERVICE_DIR/error.log"
echo "Checking version to see if things successfully started up..."
VERSION=$(curl -s -d '{{"params":[],"method":"Catalog.version","version":"1.1","id":"5313251235"}}' http://localhost:$port)
if [ 0 -eq $? ]
then
echo $VERSION | python -c 'import sys, json; print(" -> up and running: "+json.load(sys.stdin)["result"][0])'
else
echo "Unable to get a valid version, service probably did not start correctly. Check the logs."
exit 1
fi

0 comments on commit c08334b

Please sign in to comment.