Skip to content

Instantly share code, notes, and snippets.

@daxxog
Last active December 11, 2015 14:58
Show Gist options
  • Save daxxog/4617740 to your computer and use it in GitHub Desktop.
Save daxxog/4617740 to your computer and use it in GitHub Desktop.
#!/bin/bash
ulimit -f unlimited -t unlimited -v unlimited -n 64000 -m unlimited -u 32000
if [ -f /var/lib/mongodb/mongod.lock ]; then
rm /var/lib/mongodb/mongod.lock
sudo /usr/bin/mongod --port 27017 --logpath /var/log/mongodb.log --replSet rs0 --repair
else
sudo /usr/bin/mongod --port 27017 --logpath /var/log/mongodb.log --replSet rs0
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment