2013-12-22 23:44:26 -05:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
numServers=$1
|
|
|
|
baseStopPort=6572
|
|
|
|
|
|
|
|
die () {
|
|
|
|
echo >&2 "$@"
|
|
|
|
exit 1
|
|
|
|
}
|
|
|
|
|
|
|
|
[ "$#" -eq 1 ] || die "1 argument required, $# provided, usage: stop.sh {numServers}"
|
2012-01-25 14:49:26 -05:00
|
|
|
|
|
|
|
cd ../example
|
|
|
|
|
|
|
|
java -DSTOP.PORT=7983 -DSTOP.KEY=key -jar start.jar --stop
|
2013-12-22 23:44:26 -05:00
|
|
|
|
|
|
|
|
|
|
|
for (( i=2; i <= $numServers; i++ ))
|
|
|
|
do
|
|
|
|
echo "starting example$i"
|
|
|
|
cd ../example$i
|
|
|
|
stopPort=`expr $baseStopPort + $i`
|
|
|
|
java -DSTOP.PORT=$stopPort -DSTOP.KEY=key -jar start.jar --stop
|
|
|
|
done
|