Update check_port.sh

dependabot/github_actions/actions/checkout-3.1.0
fscarmen 4 years ago committed by GitHub
parent 0fd0a40b01
commit 621eedf095
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      check_port.sh

@ -24,10 +24,10 @@ until [[ $ALL =~ 'TW_1' ]]; do
ALL=$(wget -qO- --header="cookie: $TOKEN" https://tcp$STACK.ping.pe/ajax_getPingResults_v2.php?stream_id=$STREAM_ID)
done
yellow "状态\t 地方\t ISP"
yellow " 状态\t 地方\t ISP "
for ((i=0;i<${#NODE_ID[@]};i++)); do
RESULT[i]=$(echo $ALL | python3 -m json.tool | grep -A 2 ${NODE_ID[i]} | grep result | sed "s#[\":, ]##g")
RESULT[i]=${RESULT[i]:-'result1'}
[[ ${RESULT[i]} = result0 ]] && COLOR=green || COLOR=red
$COLOR "$(eval echo "\$${RESULT[i]}")\t ${NODE_ZH[i]}"
$COLOR " $(eval echo "\$${RESULT[i]}")\t ${NODE_ZH[i]} "
done

Loading…
Cancel
Save