summaryrefslogtreecommitdiff
path: root/debian
diff options
context:
space:
mode:
Diffstat (limited to 'debian')
-rw-r--r--debian/mongod.upstart15
1 files changed, 6 insertions, 9 deletions
diff --git a/debian/mongod.upstart b/debian/mongod.upstart
index a2647362357..b5004510cf3 100644
--- a/debian/mongod.upstart
+++ b/debian/mongod.upstart
@@ -13,15 +13,12 @@ limit nproc 32000 32000
kill timeout 300 # wait 300s between SIGTERM and SIGKILL.
pre-start script
- if ! [ -d /var/lib/mongodb/ ]; then
- mkdir -p /var/lib/mongodb/
- chown -R mongodb:mongodb /var/lib/mongodb/
- fi
-
- if ! [ -d /var/log/mongodb/ ]; then
- mkdir -p /var/log/mongodb/
- chown -R mongodb:mongodb /var/log/mongodb/
- fi
+ if [ ! -d /var/lib/mongod ]; then
+ mkdir -p /var/lib/mongodb && chown mongodb:mongodb /var/lib/mongodb
+ fi
+ if [ ! -d /var/log/mongod ]; then
+ mkdir -p /var/log/mongodb && chown mongodb:mongodb /var/log/mongodb
+ fi
end script
start on runlevel [2345]