0
0
mirror of https://github.com/mongodb/mongo.git synced 2024-12-01 01:21:03 +01:00
mongodb/debian/mongodb.upstart
Richard Kreuter c0dc0be108 Wait 300s for server shutdown in deb initscripts. SERVER-2041, maybe.
Re: SERVER-2041, I can't reproduce the behavior the user reports, but
it could be a timing issue where the running mongod hasn't finished
shutting down before the next mongod tries to start.
2011-03-17 12:32:30 -04:00

20 lines
536 B
Plaintext

# 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