MongoDB的服務啓動腳本!

#!/bin/sh
#chkconfig: 2345 80 90
#description: mongodb
start() {
/usr/local/mongodb-linux-x86_64-rhel70-3.6.6/bin/mongod -f /usr/local/mongodb-linux-x86_64-rhel70-3.6.6/bin/mongodb.conf
}

stop() {
/usr/local/mongodb-linux-x86_64-rhel70-3.6.6/bin/mongod -f /usr/local/mongodb-linux-x86_64-rhel70-3.6.6/bin/mongodb.conf --shutdown
}

case "$1" in
start)
start
;;
stop)
stop
;;
restart)
stop
start
;;
*)
echo $"Usage: $0 {start|stop|restart}"
exit 1
esac

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章