#!/bin/bash
GAME_ID='GGGGG'
TEAM_ID='TTTTT'
BUCKET='zhdemo'
URL='http://find.asfor.cn/login.php'
while true
do
    aws s3 sync s3://$BUCKET /opt/shell/sync
    cd /opt/shell/sync
    ls -l |cut -c 40-80 > /opt/shell/found
    cat /opt/shell/found | while read line
    do
        cat "/opt/shell/sync/$line"
        UUID=`cat "/opt/shell/sync/$line"`
        echo ""
        REQ_RESP=`curl -i -H "Accept: application/json" -X POST -d '{"game":"'"$GAME_ID"'", "team":"'"$TEAM_ID"'", "order":"'"$UUID"'"}' $URL`
        echo "Request response: "
        echo $REQ_RESP
    done
    sleep 8s
done
最后修改:2022 年 11 月 17 日
分享是对我最大的赞赏