From e56c8cba2d862594a30eb0de58bd9964d0bf8f3e Mon Sep 17 00:00:00 2001 From: Whispering Wind <151555003+ReturnFI@users.noreply.github.com> Date: Sat, 8 Mar 2025 10:36:05 +0330 Subject: [PATCH] Fix: Restart service to clear API traffic --- core/scripts/hysteria2/edit_user.sh | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/core/scripts/hysteria2/edit_user.sh b/core/scripts/hysteria2/edit_user.sh index f27d63c..5deee56 100644 --- a/core/scripts/hysteria2/edit_user.sh +++ b/core/scripts/hysteria2/edit_user.sh @@ -220,20 +220,16 @@ edit_user() { new_traffic_limit=$traffic_limit fi - new_expiration_days=${new_expiration_days:-$expiration_days} + new_expiration_days=${new_expiration_days:-$expiration_days} new_creation_date=${new_creation_date:-$creation_date} new_blocked=$(convert_blocked_status "${new_blocked:-$blocked}") - + python3 $CLI_PATH restart-hysteria2 + if ! update_user_info "$username" "$new_username" "$new_password" "$new_traffic_limit" "$new_expiration_days" "$new_creation_date" "$new_blocked"; then return 1 # Update user failed fi - if [ $? -ne 0 ]; then - echo "Failed to restart Hysteria service." - return 1 - fi - echo "User updated successfully." return 0 # Operation complete without error.