Custom DNS option wrong value fix (#559)

Custom DNS option wrong value fix
This commit is contained in:
xPakrikx 2020-03-10 10:43:13 +01:00 committed by GitHub
parent 7a4f9278e7
commit 3f2ad88cbf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -296,7 +296,7 @@ function installQuestions () {
echo " 11) AdGuard DNS (Russia)"
echo " 12) NextDNS (Worldwide)"
echo " 13) Custom"
until [[ "$DNS" =~ ^[0-9]+$ ]] && [ "$DNS" -ge 1 ] && [ "$DNS" -le 12 ]; do
until [[ "$DNS" =~ ^[0-9]+$ ]] && [ "$DNS" -ge 1 ] && [ "$DNS" -le 13 ]; do
read -rp "DNS [1-12]: " -e -i 3 DNS
if [[ $DNS == 2 ]] && [[ -e /etc/unbound/unbound.conf ]]; then
echo ""
@ -314,7 +314,7 @@ function installQuestions () {
unset DNS
unset CONTINUE
fi
elif [[ $DNS == "12" ]]; then
elif [[ $DNS == "13" ]]; then
until [[ "$DNS1" =~ ^((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$ ]]; do
read -rp "Primary DNS: " -e DNS1
done