2013-09-17 22:04:50 +02:00
|
|
|
# Ubuntu upstart file at /etc/init/mongod.conf
|
2009-12-14 18:08:40 +01:00
|
|
|
|
2013-11-07 00:25:39 +01:00
|
|
|
# Recommended ulimit values for mongod or mongos
|
|
|
|
# See http://docs.mongodb.org/manual/reference/ulimit/#recommended-settings
|
|
|
|
#
|
|
|
|
limit fsize unlimited unlimited
|
|
|
|
limit cpu unlimited unlimited
|
|
|
|
limit as unlimited unlimited
|
|
|
|
limit nofile 64000 64000
|
|
|
|
limit rss unlimited unlimited
|
|
|
|
limit nproc 32000 32000
|
2010-08-13 16:24:00 +02:00
|
|
|
|
2011-03-17 17:30:24 +01:00
|
|
|
kill timeout 300 # wait 300s between SIGTERM and SIGKILL.
|
|
|
|
|
2009-12-14 18:08:40 +01:00
|
|
|
pre-start script
|
|
|
|
mkdir -p /var/lib/mongodb/
|
|
|
|
mkdir -p /var/log/mongodb/
|
|
|
|
end script
|
|
|
|
|
2010-02-12 17:14:29 +01:00
|
|
|
start on runlevel [2345]
|
|
|
|
stop on runlevel [06]
|
2009-12-14 18:08:40 +01:00
|
|
|
|
2010-03-08 20:32:44 +01:00
|
|
|
script
|
2013-09-27 00:06:20 +02:00
|
|
|
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
|
2010-03-08 20:32:44 +01:00
|
|
|
end script
|