From 8ea25d56468e0c07760666ff0c7f90e0ff04b0f2 Mon Sep 17 00:00:00 2001 From: Whispering Wind <151555003+ReturnFI@users.noreply.github.com> Date: Fri, 23 Aug 2024 12:03:23 +0330 Subject: [PATCH] Remove TRAFFIC_FILE --- core/scripts/hysteria2/server_info.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/scripts/hysteria2/server_info.sh b/core/scripts/hysteria2/server_info.sh index 4eeb9bd..072002c 100644 --- a/core/scripts/hysteria2/server_info.sh +++ b/core/scripts/hysteria2/server_info.sh @@ -50,7 +50,7 @@ echo "Online Users: $online_user_count" echo echo "Total Traffic: " -if [ -f "$TRAFFIC_FILE" ]; then +if [ -f "$USERS_FILE" ]; then total_upload=0 total_download=0 @@ -59,7 +59,7 @@ if [ -f "$TRAFFIC_FILE" ]; then download=$(echo $line | jq -r '.download_bytes') total_upload=$(echo "$total_upload + $upload" | bc) total_download=$(echo "$total_download + $download" | bc) - done <<< "$(jq -c '.[]' $TRAFFIC_FILE)" + done <<< "$(jq -c '.[]' $USERS_FILE)" total_upload_human=$(convert_bytes $total_upload) total_download_human=$(convert_bytes $total_download)