From c03a55f11f501d92fbd0fecf4bf9cb3c37c14b33 Mon Sep 17 00:00:00 2001 From: Angristan Date: Sun, 27 Nov 2016 14:31:25 +0100 Subject: [PATCH] Making sure a correct DNS option is selected --- openvpn-install.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/openvpn-install.sh b/openvpn-install.sh index 1888330..f2ea5db 100644 --- a/openvpn-install.sh +++ b/openvpn-install.sh @@ -218,7 +218,9 @@ else echo " 3) DNS.WATCH (Germany)" echo " 4) OpenDNS (Anycast: worldwide)" echo " 5) Google (Anycast: worldwide)" - read -p "DNS [1-6]: " -e -i 2 DNS + while [[ $DNS != "1" && $DNS != "2" && $DNS != "3" && $DNS != "4" && $DNS != "5" ]]; do + read -p "DNS [1-5]: " -e -i 2 DNS + done echo "" echo "Finally, tell me a name for the client certificate and configuration" while [[ $CLIENT = "" ]]; do