Update beta.sh
add numeric validation
This commit is contained in:
3
beta.sh
3
beta.sh
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user