Created
August 18, 2012 04:54
-
-
Save tomoyamkung/3384547 to your computer and use it in GitHub Desktop.
[MongoDB]MongoDB の起動・停止を実行するスクリプト
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/sh | |
if [ "start" = "$1" ] ; then | |
cd /cygdrive/c/mongodb/bin | |
./mongod.exe --dbpath=../data --auth > /dev/null & | |
elif [ "stop" = "$1" ] ; then | |
ps ax | grep '/bin/mongod' | awk '{print $1}' | xargs kill -9 | |
else | |
echo "Usage: run-mongo.sh start / run-mongo.sh stop" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment