Created
May 29, 2012 21:47
-
-
Save tommedema/2830992 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Mongodb upstart file at /etc/init/mongodb.conf | |
description "Runs mongod server daemon as service." | |
start on runlevel [2345] | |
stop on runlevel [06] | |
respawn | |
respawn limit 10 100 | |
pre-start script | |
sudo -u mainuser mkdir -p /home/mainuser/data/db | |
sudo -u mainuser mkdir -p /home/mainuser/data/logs | |
end script | |
exec sudo -u mainuser /usr/local/bin/mongod --journal --nohttpinterface --dbpath /home/mainuser/data/db --logpath /home/mainuser/data/logs/mongodb.log --logappend --replSet mainapp --port 30000 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment