summaryrefslogtreecommitdiff
path: root/debian/mongodb.upstart
blob: ca6f9b75cf7ab01b5e86e929c1089e8d57734cda (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# Ubuntu upstart file at /etc/init/mongodb.conf

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