| @@ -3,8 +3,13 @@ | |||||
| python_dir=/usr/local/PlayerCode/CAPI/python/PyAPI | python_dir=/usr/local/PlayerCode/CAPI/python/PyAPI | ||||
| playback_dir=/usr/local/playback | playback_dir=/usr/local/playback | ||||
| nice -10 ./Server --port 8888 --studentCount 4 --trickerCount 1 --gameTimeInSecond 600 --url $URL --token $TOKEN --fileName $playback_dir/video --startLockFile $playback_dir/start.lock > $playback_dir/server.log & | |||||
| server_pid=$! | |||||
| if [ $EXPOSED -eq 1 ]; then | |||||
| nice -10 ./Server --port 8888 --studentCount 4 --trickerCount 1 --gameTimeInSecond 600 --url $URL --token $TOKEN --fileName $playback_dir/video --startLockFile $playback_dir/start.lock > $playback_dir/server.log & | |||||
| server_pid=$! | |||||
| else | |||||
| nice -10 ./Server --port 8888 --studentCount 4 --trickerCount 1 --gameTimeInSecond 600 --notAllowSpectator --url $URL --token $TOKEN --fileName $playback_dir/video --startLockFile $playback_dir/start.lock > $playback_dir/server.log & | |||||
| server_pid=$! | |||||
| fi | |||||
| sleep 5 | sleep 5 | ||||
| for k in {1..2} | for k in {1..2} | ||||
| do | do | ||||
| @@ -60,4 +65,4 @@ fi | |||||
| result=$(cat /usr/local/playback/result.json) | result=$(cat /usr/local/playback/result.json) | ||||
| score0=$(parse_json $result "Student") | score0=$(parse_json $result "Student") | ||||
| score1=$(parse_json $result "Tricker") | score1=$(parse_json $result "Tricker") | ||||
| curl $URL -X PUT -H "Content-Type: application/json" -H "Authorization: Bearer $TOKEN" -d '{"result":[{"team_id":0, "score":'${score0}'}, {"team_id":1, "score":'${score1}'}], "mode":'${MODE}'}' | |||||
| curl $URL -X PUT -H "Content-Type: application/json" -H "Authorization: Bearer $TOKEN" -d '{"result":[{"team_id":0, "score":'${score0}'}, {"team_id":1, "score":'${score1}'}], "mode":'${MODE}'}' | |||||