Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
executable file 35 lines (31 sloc) 587 Bytes
#!/bin/bash
#
# mongod
#
# chkconfig: - 85 15
# description: start, stop, restart mongod
#
RETVAL=0
case "$1" in
start)
/usr/bin/mongod --config /opt/mongodb/mongod_settings.conf --fork
RETVAL=$?
;;
stop)
kill `cat /data/db/mongod.lock`
RETVAL=$?
;;
restart)
kill `cat /data/db/mongod.lock`
/usr/bin/mongod --config /opt/mongodb/mongod_settings.conf --fork
RETVAL=$?
;;
status)
RETVAL=$?
;;
*)
echo "Usage: mongod {start|stop|restart|status}"
exit 1
;;
esac
exit $RETVAL