Browse Source

Update run.sh

tags/0.1.0
Changli Tang GitHub 2 years ago
parent
commit
8e16b638af
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 3 deletions
  1. +8
    -3
      dependency/shell/run.sh

+ 8
- 3
dependency/shell/run.sh View File

@@ -3,8 +3,13 @@
python_dir=/usr/local/PlayerCode/CAPI/python/PyAPI
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
for k in {1..2}
do
@@ -60,4 +65,4 @@ fi
result=$(cat /usr/local/playback/result.json)
score0=$(parse_json $result "Student")
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}'}'

Loading…
Cancel
Save