diff options
Diffstat (limited to 'debian')
-rw-r--r-- | debian/mongod.upstart | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/debian/mongod.upstart b/debian/mongod.upstart index b76746123ca..a2647362357 100644 --- a/debian/mongod.upstart +++ b/debian/mongod.upstart @@ -13,8 +13,15 @@ limit nproc 32000 32000 kill timeout 300 # wait 300s between SIGTERM and SIGKILL. pre-start script - mkdir -p /var/lib/mongodb/ - mkdir -p /var/log/mongodb/ + 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 end script start on runlevel [2345] |