-
Type: Improvement
-
Resolution: Won't Fix
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: Admin
-
None
-
(copied to CRM)
Here's an updated version of the init script in mongo/rpm/init.d-mongod that can start and stop multiple instances on the same machine. The idea is that you can have multiple /etc/mongod.conf files, with the name pattern /etc/mongod.*.conf. If there are several such files, the script will launch the corresponding instances one by one, and also shut them down.
As part of this, I removed the 1.8 compatibility code and rewrote the stop() routine so it uses mongod --shutdown. There's one caveat to this: The shutdown process is launched as root and would normally overwrite the log file with a file owned by root. To prevent this, I added the option --logpath /dev/null at the end of the command.