mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2025-09-10 12:16:18 +00:00
Update x-ui.sh
Corrected the confirmation of the deleted ports.
This commit is contained in:
parent
24756231a2
commit
aa70e446d0
1 changed files with 12 additions and 1 deletions
13
x-ui.sh
13
x-ui.sh
|
@ -661,8 +661,19 @@ delete_ports() {
|
||||||
done
|
done
|
||||||
|
|
||||||
# Confirm that the ports are deleted
|
# Confirm that the ports are deleted
|
||||||
|
|
||||||
echo "Deleted the specified ports:"
|
echo "Deleted the specified ports:"
|
||||||
ufw status | grep "ALLOW" | grep -Eo "[0-9]+(/[a-z]+)?"
|
for port in "${PORT_LIST[@]}"; do
|
||||||
|
if [[ $port == *-* ]]; then
|
||||||
|
start_port=$(echo $port | cut -d'-' -f1)
|
||||||
|
end_port=$(echo $port | cut -d'-' -f2)
|
||||||
|
# Check if the port range has been successfully deleted
|
||||||
|
(ufw status | grep -q "$start_port:$end_port") || echo "$start_port-$end_port"
|
||||||
|
else
|
||||||
|
# Check if the individual port has been successfully deleted
|
||||||
|
(ufw status | grep -q "$port") || echo "$port"
|
||||||
|
fi
|
||||||
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
update_geo() {
|
update_geo() {
|
||||||
|
|
Loading…
Reference in a new issue