Closed BryannaM closed 3 years ago
I just noticed this issue here, I have just submitted a PR to get this closed. It seems like the original attempt have failed due to lack of communication. #168
The difference between Debian and RedHat derivatives is that the systemd file (/lib/systemd/system/mongod.service) in RedHat has Type=forking specified for backwards compatibility where as Debian derivatives don't have this. We just simply need to differentiate between the two OS types and apply different config for each of them to make everything work as it should.
Looks good now.
In the Systemd service file for RHEL it has this line.
"PIDFile=/var/run/mongodb/mongod.pid"
Which means the mongod.conf needs to have a line to create that pid otherwise systemd will time out and fail to start the service.
pidFilePath: "/var/run/mongodb/mongod.pid"