Update beta.sh

add numeric validation
This commit is contained in:
iamromulan
2024-01-05 18:27:53 -05:00
committed by GitHub
parent 3c342ff6fc
commit 515dc96328

View File

@@ -152,6 +152,8 @@ configure_simple_firewall() {
read port
if [ "$port" = "done" ]; then
break
elif ! echo "$port" | grep -qE '^[0-9]+$'; then
echo "Invalid input: Please enter a numeric value."
elif echo "$ports" | grep -q "^$port\$"; then
# Remove port
ports=$(echo "$ports" | grep -v "^$port\$")
@@ -171,6 +173,7 @@ configure_simple_firewall() {
}
# Function for Simplefirewall Submenu
simplefirewall_menu() {
while true; do