mongod --fork --dbpath ../data --smallfiles --logpath ../data/mongo.log
runs perfectly from terminal, while in directory
But, when I use same command and directory for upstart session job file (at
# mongod_service - mongoDB job file description "MongoDB service" author "admin" # When to start the service start on runlevel  # When to stop the service stop on runlevel  # Automatically restart process if crashed # respawn # Essentially lets upstart know the process will detach itself to the background expect fork # working directory chdir /mongo/bin/ # log this job console log # Start mongod as daemon exec /mongo/bin/mongod --fork --dbpath /mongo/data --smallfiles --logpath /mongo/data/mongo.log
Changed job file and It starts fine now, but when I try to stop it with
initctl stop mongod-service, the command never completes !.
Can anyone suggest how to make this work ?