From 03aba0f0cd98bd9612ebfc1709a500794b4612c9 Mon Sep 17 00:00:00 2001 From: angristan Date: Thu, 20 Sep 2018 00:04:26 +0200 Subject: [PATCH] Menu improvement --- openvpn-install.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/openvpn-install.sh b/openvpn-install.sh index 37adb96..183b0b5 100644 --- a/openvpn-install.sh +++ b/openvpn-install.sh @@ -813,9 +813,11 @@ function manageMenu () { echo " 2) Revoke existing user" echo " 3) Remove OpenVPN" echo " 4) Exit" - read -rp "Select an option [1-4]: " option + until [[ "$MENU_OPTION" =~ ^[1-4]$ ]]; do + read -rp "Select an option [1-4]: " MENU_OPTION + done - case $option in + case $MENU_OPTION in 1) newClient ;;