From 7d85abdd4347ab7e730bb9ab6cc11bf071b0ff1a Mon Sep 17 00:00:00 2001 From: Whispering Wind <151555003+ReturnFI@users.noreply.github.com> Date: Fri, 23 Aug 2024 12:59:13 +0330 Subject: [PATCH] Remove -t option --- core/scripts/hysteria2/get_user.sh | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/core/scripts/hysteria2/get_user.sh b/core/scripts/hysteria2/get_user.sh index 7b7a814..93fee68 100644 --- a/core/scripts/hysteria2/get_user.sh +++ b/core/scripts/hysteria2/get_user.sh @@ -2,25 +2,20 @@ source /etc/hysteria/core/scripts/path.sh -SHOW_TRAFFIC=true - -while getopts ":u:t" opt; do +while getopts ":u:" opt; do case ${opt} in u ) USERNAME=$OPTARG ;; - t ) - SHOW_TRAFFIC=false - ;; \? ) - echo "Usage: $0 -u [-t]" + echo "Usage: $0 -u " exit 1 ;; esac done if [ -z "$USERNAME" ]; then - echo "Usage: $0 -u [-t]" + echo "Usage: $0 -u " exit 1 fi @@ -38,10 +33,12 @@ fi echo "$USER_INFO" | jq . -if [ "$SHOW_TRAFFIC" = true ]; then - UPLOAD_BYTES=$(echo "$USER_INFO" | jq -r '.upload_bytes // "No upload data available"') - DOWNLOAD_BYTES=$(echo "$USER_INFO" | jq -r '.download_bytes // "No download data available"') - STATUS=$(echo "$USER_INFO" | jq -r '.status // "Status unavailable"') -fi +UPLOAD_BYTES=$(echo "$USER_INFO" | jq -r '.upload_bytes // "No upload data available"') +DOWNLOAD_BYTES=$(echo "$USER_INFO" | jq -r '.download_bytes // "No download data available"') +STATUS=$(echo "$USER_INFO" | jq -r '.status // "Status unavailable"') + +echo "Upload Bytes: $UPLOAD_BYTES" +echo "Download Bytes: $DOWNLOAD_BYTES" +echo "Status: $STATUS" exit 0