In 2.6, MongoDB now supports YAML configuration files.
The /etc/rc.d/init.d/mongod script in the mongodb-org RPM package doesn't work because of the following line that parses the pidfile path from the config file:
The above line doesn't correctly parse YAML configuration files, so the init.d script is unable to retrieve the pidfile needed to stop the mongod service.
The regex should be modified to cover both old and new style configuration files. The following works for YAML files: