Fix: Restart service to clear API traffic

This commit is contained in:
Whispering Wind
2025-03-08 10:36:05 +03:30
committed by GitHub
parent fdaacf927b
commit e56c8cba2d

View File

@ -224,16 +224,12 @@ edit_user() {
new_creation_date=${new_creation_date:-$creation_date} new_creation_date=${new_creation_date:-$creation_date}
new_blocked=$(convert_blocked_status "${new_blocked:-$blocked}") 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 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 return 1 # Update user failed
fi fi
if [ $? -ne 0 ]; then
echo "Failed to restart Hysteria service."
return 1
fi
echo "User updated successfully." echo "User updated successfully."
return 0 # Operation complete without error. return 0 # Operation complete without error.