简体   繁体   中英

Can't understand Mongodb upstart ('/etc/init.d/mongod') script in ubuntu 14.04

  • I have an mongo 2.6+ installation running ubuntu 14.04 on which 'sudo service mongod start/stop/restart' works just fine.

  • Out of curiosity I started looking out for 'upstart' script of mongod inside /etc/init.d and much to my confusion the init script for mongod has no mention of any mongo related activity in it.

  • The exact contents of mongod inside /etc/init.d/mongod are as following:

http://pastebin.com/qvNTx74M#

Someone please help me understand what is going on here.

What you are seeing is that mongo's init script is symlinked to /lib/init/upstart-job so that /etc/init.d/monogod start is relayed to Upstart properly. The file you pastebinned has nothing to do with how mongo is started. Look at the file /etc/init/mongod.conf for the upstart config for mongo.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM