Created
December 22, 2017 19:56
-
-
Save washingtonsoares/b4112ab0c808f285732b9c9085f28375 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 | |
serverAmount=$1 | |
initialThriftPort=$2 | |
initialCopyCatPort=$3 | |
for ((number=0; number < $serverAmount; number++)){ | |
port=$((initialThriftPort+number)) | |
mvn exec:java -Dexec.mainClass=chavevalor.ChaveValorServer -Dexec.args="$port $number $serverAmount $initialThriftPort" & | |
} | |
for ((number=0; number < $serverAmount*3; number+=3)){ | |
port1=$((initialCopyCatPort)) | |
port2=$((initialCopyCatPort+1)) | |
port3=$((initialCopyCatPort+2)) | |
mvn exec:java -Dexec.mainClass=chavevalor.MapStateMachine -Dexec.args="$number localhost $port1 localhost $port2 localhost $port3" & | |
} | |
exit 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment