I have the following services on a single shard server:
sudo mongod --dbpath /data/db/ --port 31001
sudo mongod --configsvr --dbpath /data/configdb/ --port 21001
The same server is using for shard and config.
for now I am testing the environment so I am running these rows manually.
I want to run it as a service. I did not event tried it, adding dbpath twice to the config file will not do the work, can you suggest please a config in order to make these lines run as a service?