Created
October 9, 2015 15:34
-
-
Save steveneaston/32631fcd7c37218fbbe7 to your computer and use it in GitHub Desktop.
Use Vaprobash to install mongodb if required and restart it if already running
This file contains hidden or 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
#!/usr/bin/env bash | |
echo ">>> Installing MongoDB" | |
mongod --version > /dev/null 2>&1 | |
MONGO_IS_INSTALLED=$? | |
if [ $MONGO_IS_INSTALLED -eq 0 ]; then | |
echo ">>> MongoDB already installed" | |
service mongod restart | |
else | |
bash -c "$(curl -fsSL https://raw.githubusercontent.com/steveneaston/Vaprobash/master/scripts/mongodb.sh)" bash $1 $2 | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment