7 PID
=`pidof /usr/bin/mongod`
10 stat_busy
"Starting mongod"
11 [ -z "$PID" ] && /bin
/su mongodb
-s /bin
/sh
-c "/usr/bin/mongod --config /etc/mongodb.conf run &" > /var
/log
/mongod
2>&1
12 if [ $?
-gt 0 ] ; then
20 stat_busy
"Stopping mongod"
21 [ ! -z "$PID" ] && kill $PID &> /dev
/null
22 if [ $?
-gt 0 ] ; then
25 #wait for the server to finish shutting down
26 while [ -n "$(pidof /usr/bin/mongod)" ] ; do
38 echo "usage: $0 {start|stop|restart}"