diff --git a/roles/mongodb/templates/mongod.conf b/roles/mongodb/templates/mongod.conf index b55da7e29..478375a5e 100644 --- a/roles/mongodb/templates/mongod.conf +++ b/roles/mongodb/templates/mongod.conf @@ -9,10 +9,10 @@ bind_ip = 127.0.0.1 port = 27018 # Fork server process (false by default) -fork = true +# fork = true # Full path to pidfile (if not set, no pidfile is created) -pidfilepath = /var/run/mongodb/mongod.pid +# pidfilepath = /var/run/mongodb/mongod.pid # Log file to send write to instead of stdout - has to be a file, not directory logpath = /var/log/mongodb/mongod.log diff --git a/roles/mongodb/templates/mongodb.service b/roles/mongodb/templates/mongodb.service index e93a9ecf8..328682a10 100644 --- a/roles/mongodb/templates/mongodb.service +++ b/roles/mongodb/templates/mongodb.service @@ -3,12 +3,10 @@ Description=High-performance, schema-free document-oriented database After=syslog.target network.target [Service] -Type=forking +Type=simple User=mongodb Group=mongodb -PIDFile=/var/run/mongodb/mongod.pid -#EnvironmentFile=/etc/sysconfig/mongodb -ExecStart=/usr/bin/mongod --fork -f /etc/mongod.conf +ExecStart=/usr/bin/mongod -f /etc/mongod.conf [Install] WantedBy=multi-user.target