mirror of
https://github.com/mongodb/mongo.git
synced 2024-12-01 09:32:32 +01:00
20 lines
530 B
Plaintext
20 lines
530 B
Plaintext
# Ubuntu upstart file at /etc/init/mongod.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_MONGOD="yes"
|
|
if [ -f /etc/default/mongod ]; then . /etc/default/mongod; fi
|
|
if [ "x$ENABLE_MONGOD" = "xyes" ]; then exec start-stop-daemon --start --quiet --chuid mongodb --exec /usr/bin/mongod -- --config /etc/mongod.conf; fi
|
|
end script
|