Update menu.sh

dependabot/github_actions/actions/checkout-3.1.0
fscarmen 4 years ago committed by GitHub
parent 36e93f4bb1
commit ebb80be15e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      menu.sh

@ -1680,8 +1680,8 @@ check_quota(){
if [ "$CHECK_TYPE" = 1 ]; then
QUOTA=$(grep -oP 'Quota: \K\d+' <<< $ACCOUNT)
else
ACCESS_TOKEN=$(grep 'access_token' /etc/wireguard/wgcf-account.toml | cut -d \" -f2)
DEVICE_ID=$(grep 'device_id' /etc/wireguard/wgcf-account.toml | cut -d \" -f2)
ACCESS_TOKEN=$(grep 'access_token' /etc/wireguard/wgcf-account.toml | cut -d \' -f2)
DEVICE_ID=$(grep 'device_id' /etc/wireguard/wgcf-account.toml | cut -d \' -f2)
API=$(curl -s "https://api.cloudflareclient.com/v0a884/reg/$DEVICE_ID" -H "User-Agent: okhttp/3.12.1" -H "Authorization: Bearer $ACCESS_TOKEN")
QUOTA=$(grep -oP '"quota":\K\d+' <<< $API)
fi

Loading…
Cancel
Save