mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2025-09-09 19:56:19 +00:00
modified: x-ui.sh
This commit is contained in:
parent
3d039ec5da
commit
b98d1ee0e7
1 changed files with 1 additions and 1 deletions
2
x-ui.sh
2
x-ui.sh
|
@ -624,7 +624,7 @@ delete_ports() {
|
||||||
read -p "Enter the ports you want to delete (e.g. 80,443,2053 or range 400-500): " ports
|
read -p "Enter the ports you want to delete (e.g. 80,443,2053 or range 400-500): " ports
|
||||||
|
|
||||||
# Check if the input is valid
|
# Check if the input is valid
|
||||||
if ! [[ $ports =~ ^([0-9]+|[0-9]+-[0-9]+)(,([0-9]+|[0-9]+-[0-9]+))*$ ]]; then
|
if ! echo "$ports" | grep -Eq "^([0-9]+|[0-9]+-[0-9]+)(,([0-9]+|[0-9]+-[0-9]+))*$"; then
|
||||||
echo "Error: Invalid input. Please enter a comma-separated list of ports or a range of ports (e.g. 80,443,2053 or 400-500)." >&2
|
echo "Error: Invalid input. Please enter a comma-separated list of ports or a range of ports (e.g. 80,443,2053 or 400-500)." >&2
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue