Last active
August 29, 2015 14:03
-
-
Save luchaninov/9b23c9793d9eca6f15b6 to your computer and use it in GitHub Desktop.
Check if Mongo is working
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
#!/bin/bash | |
TEST="TEST PASSED" | |
RESULT="`mongo --quiet --eval \"print('${TEST}');\" 2> /dev/null | grep --color=never \"${TEST}\"`" | |
if [[ "${RESULT}" == "${TEST}" ]]; then | |
echo "Mongo is working" | |
else | |
echo "Mongo is not working" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment