I need to use mongodb with the -rest option. But mongodb starts automatically when it boots, so I think I need to change the file or something like that.
Where can I add this --rest option?
I have this file in /etc/init/mongodb.conf, not sure what to edit:
# Ubuntu upstart file at /etc/init/mongodb.conf limit nofile 20000 20000 kill timeout 300 # wait 300s between SIGTERM and SIGKILL. pre-start script mkdir -p /var/lib/mongodb/ mkdir -p /var/log/mongodb/ end script start on runlevel [2345] stop on runlevel [06] script ENABLE_MONGODB="yes" if [ -f /etc/default/mongodb ]; then . /etc/default/mongodb; fi if [ "x$ENABLE_MONGODB" = "xyes" ]; then exec start-stop-daemon --start --quiet --chuid mongodb --exec /usr/bin/mongod -- --config /etc/mongodb.conf; fi end script
And this file on /etc/init.d/mongodb:
#!/bin/sh -e
mongodb
Chocodeveloper
source share