summaryrefslogtreecommitdiff
path: root/debian/mongod.upstart
blob: 48180ba8a4e605ce5ca798305e8fa8502963199c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# 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