summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--debian/mongod.service1
-rw-r--r--rpm/mongod.service1
2 files changed, 2 insertions, 0 deletions
diff --git a/debian/mongod.service b/debian/mongod.service
index 12283a12ef5..b510d2a0fa2 100644
--- a/debian/mongod.service
+++ b/debian/mongod.service
@@ -8,6 +8,7 @@ Wants=network-online.target
User=mongodb
Group=mongodb
EnvironmentFile=-/etc/default/mongod
+Environment="MONGODB_CONFIG_OVERRIDE_NOFORK=1"
ExecStart=/usr/bin/mongod --config /etc/mongod.conf
RuntimeDirectory=mongodb
# file size
diff --git a/rpm/mongod.service b/rpm/mongod.service
index 51f0d0bb524..81059df8343 100644
--- a/rpm/mongod.service
+++ b/rpm/mongod.service
@@ -8,6 +8,7 @@ Wants=network-online.target
User=mongod
Group=mongod
Environment="OPTIONS=-f /etc/mongod.conf"
+Environment="MONGODB_CONFIG_OVERRIDE_NOFORK=1"
EnvironmentFile=-/etc/sysconfig/mongod
ExecStart=/usr/bin/mongod $OPTIONS
# file size