|
|
@@ -53,13 +53,9 @@ if [ -f $playback_dir/start.lock ]; then |
|
|
sleep 1 |
|
|
sleep 1 |
|
|
ps -p $server_pid > /dev/null 2>&1 |
|
|
ps -p $server_pid > /dev/null 2>&1 |
|
|
done |
|
|
done |
|
|
touch $playback_dir/1.flag |
|
|
|
|
|
result=$(cat /usr/local/playback/result.json) |
|
|
result=$(cat /usr/local/playback/result.json) |
|
|
touch $playback_dir/2.flag |
|
|
|
|
|
score0=$(echo "$result" | grep -oP '(?<="Student":)\d+') |
|
|
score0=$(echo "$result" | grep -oP '(?<="Student":)\d+') |
|
|
touch $playback_dir/3.flag |
|
|
|
|
|
score1=$(echo "$result" | grep -oP '(?<="Tricker":)\d+') |
|
|
score1=$(echo "$result" | grep -oP '(?<="Tricker":)\d+') |
|
|
touch $playback_dir/4.flag |
|
|
|
|
|
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}'}'> $playback_dir/send.log 2>&1 |
|
|
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}'}'> $playback_dir/send.log 2>&1 |
|
|
touch $playback_dir/finish.lock |
|
|
touch $playback_dir/finish.lock |
|
|
echo "Finish" |
|
|
echo "Finish" |
|
|
|