2013-12-22 23:44:26 -05:00
|
|
|
#!/bin/bash
|
|
|
|
|
2012-02-28 02:05:37 -05:00
|
|
|
source ./functions.sh
|
|
|
|
|
|
|
|
case "$1" in
|
|
|
|
start)
|
2014-08-06 12:46:31 -04:00
|
|
|
start $2 $3 "$4"
|
2012-02-28 02:05:37 -05:00
|
|
|
;;
|
|
|
|
stop)
|
|
|
|
stop $2
|
|
|
|
;;
|
|
|
|
kill)
|
|
|
|
do_kill $2
|
|
|
|
;;
|
|
|
|
reinstall)
|
|
|
|
reinstall $2
|
|
|
|
;;
|
|
|
|
rebuild)
|
|
|
|
rebuild $2
|
|
|
|
;;
|
|
|
|
status)
|
|
|
|
status $2
|
|
|
|
;;
|
|
|
|
cleanlogs)
|
|
|
|
cleanlogs $2
|
|
|
|
;;
|
|
|
|
taillogs)
|
|
|
|
taillogs $2
|
|
|
|
;;
|
|
|
|
createshard)
|
|
|
|
createshard $2 $3 $4 $5
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
echo $"Usage: $0 { rebuild| reinstall <instanceid>| start <instanceid> [numshards]| stop <instanceid>|kill <instanceid>| status<instanceid>| cleanlogs<instanceid>| createshard <instance> <collection> <coreName> [shardId]}"
|
|
|
|
exit 1
|
|
|
|
esac
|
|
|
|
exit 0
|