mongodb启动脚本

  

#!/bin/sh  
#  
#chkconfig: 2345 80 90  
#description: mongodb  
start() {
 /usr/local/yunshipei/enterplorer/mongodb/bin/mongod -f /usr/local/yunshipei/enterplorer/mongodb/etc/mongodb.conf
}

stop() {
 /usr/local/yunshipei/enterplorer/mongodb/bin/mongod -f /usr/local/yunshipei/enterplorer/mongodb/etc/mongodb.conf --shutdown
}

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

 

posted @ 2017-02-20 14:32  DevOps_QXW  阅读(2042)  评论(0编辑  收藏  举报