Added check to see if Mongod is running

This commit is contained in:
Ethan Bruning 2010-09-18 02:20:44 +08:00 committed by Maxwell Salzberg
parent 182c6228f3
commit d1c7559c29

View file

@ -1,5 +1,13 @@
#!/bin/bash
mkdir -p -v log/thin/
bundle exec ruby ./script/websocket_server.rb&
bundle exec thin start $@
# Check if Mongo is running
if ! ps ax | grep -v grep | grep mongod >/dev/null
then
echo "Mongod not started"
else
mkdir -p -v log/thin/
bundle exec ruby ./script/websocket_server.rb&
bundle exec thin start $@
fi