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)
|
2015-08-12 13:43:08 -04:00
|
|
|
cleanlogs $2
|
|
|
|
;;
|
2012-02-28 02:05:37 -05:00
|
|
|
taillogs)
|
2015-08-12 13:43:08 -04:00
|
|
|
taillogs $2
|
|
|
|
;;
|
2012-02-28 02:05:37 -05:00
|
|
|
createshard)
|
2015-08-12 13:43:08 -04:00
|
|
|
createshard $2 $3 $4 $5
|
|
|
|
;;
|
2012-02-28 02:05:37 -05:00
|
|
|
*)
|
|
|
|
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
|