mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2025-09-09 03:36: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
|
||||
|
||||
# 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
|
||||
exit 1
|
||||
fi
|
||||
|
|
Loading…
Reference in a new issue