From 655fc1cd8d827b277f5eead2ee9072b35500b92f Mon Sep 17 00:00:00 2001 From: Hai HUANG <101720804+maple367@users.noreply.github.com> Date: Thu, 29 Feb 2024 20:51:57 +0800 Subject: [PATCH] modified: x-ui.sh --- x-ui.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/x-ui.sh b/x-ui.sh index 782fa011..1f8d0566 100644 --- a/x-ui.sh +++ b/x-ui.sh @@ -639,8 +639,10 @@ EOF start_port=$(echo $port | cut -d'-' -f1) end_port=$(echo $port | cut -d'-' -f2) # Loop through the range and delete each port - for ((i = start_port; i <= end_port; i++)); do + i=$start_port + while [ $i -le $end_port ]; do ufw delete allow $i + i=$((i + 1)) done else ufw delete allow "$port"