From 10f56d3ea727b69aa7df5d5a65b7bd8bbf0cffe6 Mon Sep 17 00:00:00 2001 From: Sayem Chowdhury Date: Tue, 1 May 2018 17:02:22 +0600 Subject: [PATCH] Fixed DNS related issue --- openvpn-install.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/openvpn-install.sh b/openvpn-install.sh index e0918a6..22be453 100644 --- a/openvpn-install.sh +++ b/openvpn-install.sh @@ -244,8 +244,8 @@ else echo " 8) Yandex Basic (Russia)" echo " 9) AdGuard DNS (Russia)" echo " 10) Custom" - until [[ "$DNS" -gt 0 && "$DNS" -le 10 && "$DNS" =~ ^[0-9]$ ]]; do - read -rp "DNS [1-8]: " -e -i 1 DNS + until [[ "$DNS" =~ ^[0-9]+$ ]] && [ "$DNS" -ge 1 -a "$DNS" -le 10 ]; do + read -rp "DNS [1-10]: " -e -i 1 DNS done if [[ $DNS = "10" ]]; then # Get DNS IP and validate