summaryrefslogtreecommitdiff
path: root/rpm
diff options
context:
space:
mode:
authorBrian Samek <brian.samek@mongodb.com>2016-12-06 15:54:34 -0500
committerBrian Samek <brian.samek@mongodb.com>2016-12-07 17:43:22 -0500
commitb9705586bf64597f325539d4e065bb58603f11e5 (patch)
tree432207577eecec5f29f53a927d5e1555c7f32242 /rpm
parenta2f78bd51b6390f8e0f151b7a92f7f34567018cb (diff)
downloadmongo-b9705586bf64597f325539d4e065bb58603f11e5.tar.gz
SERVER-27241 Create runtime directory on service start
(cherry picked from commit e7a503b2b993a387a52133ad37e8976e9cd2ab07)
Diffstat (limited to 'rpm')
-rw-r--r--rpm/mongod.service4
1 files changed, 4 insertions, 0 deletions
diff --git a/rpm/mongod.service b/rpm/mongod.service
index cd030da6ad8..b5b6a0eb040 100644
--- a/rpm/mongod.service
+++ b/rpm/mongod.service
@@ -8,6 +8,10 @@ User=mongod
Group=mongod
Environment="OPTIONS=--quiet -f /etc/mongod.conf"
ExecStart=/usr/bin/mongod $OPTIONS run
+ExecStartPre=/usr/bin/mkdir -p /var/run/mongodb
+ExecStartPre=/usr/bin/chown mongod:mongod /var/run/mongodb
+ExecStartPre=/usr/bin/chmod 0755 /var/run/mongodb
+PermissionsStartOnly=true
PIDFile=/var/run/mongodb/mongod.pid
# file size
LimitFSIZE=infinity