MongoDB Service startup script

Source: Internet
Author: User

#!/bin/sh# #mongod  - Startup script for mongod## chkconfig: - 85  15# description: mongodb database.# processname: mongod# source function  library . /etc/rc.d/init.d/functions# things from mongod.conf get  There by mongod reading it# optionsoptions= " --dbpath=/home/data/mongodb/ - -logpath=/home/data/mongodb/mongodb.log --logappend & "#mongodmongod ="/usr/local/mongodb/bin/ Mongod "Lockfile=/var/lock/subsys/mongodstart () {  echo -n $" starting mongod:  "   daemon  $mongod   $OPTIONS   RETVAL=$?  echo  [  $RETVAL  -eq 0 ] && touch  $lockfile} stop () {  echo -n $ "stopping mongod: "   killproc  $mongod  -quit  retval=$?  echo   [  $RETVAL -eq 0 ] && rm -f  $lockfile} restart  ()  {         stop        start}ulimit  -n 12000RETVAL=0 case  "$"  in  start)     start     ;;   stop)     stop    ;;   restart|reload|force-reload)     restart    ;;   condrestart)     [ -f  $lockfile  ] && restart  | |  :    ;;   status)     status  $mongod     RETVAL=$?     ;;   *)     echo  "usage: $0 {start|stop|status|restart|reload| Force-reload|condrestart} "    RETVAL=1esacexit  $RETVAL

/etc/init.d/mongodb

This article is from the "lake and Laughter" blog, please make sure to keep this source http://hashlinux.blog.51cto.com/9647696/1788489

MongoDB Service startup script

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.