Created
May 30, 2012 17:19
-
-
Save tommedema/2837747 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 | |
limit nofile 20000 20000 | |
kill timeout 300 # wait 300s between SIGTERM and SIGKILL. | |
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 webapp --port 30000 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment