From 857315fe73338f8e6f16ec643be360abd454a74c Mon Sep 17 00:00:00 2001 From: pvincent Date: Sun, 6 Apr 2025 21:07:14 +0400 Subject: [PATCH] DEFAULT_RESOLVER google --- lib/functions.sh | 6 ++---- lib/install.sh | 6 +++--- scripts/miaou | 2 +- 3 files changed, 6 insertions(+), 8 deletions(-) diff --git a/lib/functions.sh b/lib/functions.sh index 19eab9d..df9a82e 100644 --- a/lib/functions.sh +++ b/lib/functions.sh @@ -11,10 +11,8 @@ NC='\033[0m' # No Color TO_BE_DEFINED="TO BE DEFINED" -FDN_DOMAINNAME=fdn.fr -FDN_NAMESERVER="ns0.$FDN_DOMAINNAME" -FDN_RESOLVER=80.67.169.12 -: $FDN_DOMAINNAME $FDN_NAMESERVER $FDN_RESOLVER +DEFAULT_RESOLVER=8.8.8.8 # google !!! +: $DEFAULT_RESOLVER function echo() { [[ -n ${PREFIX:-} ]] && printf "${DARK}%25.25s${NC} " "${PREFIX}" diff --git a/lib/install.sh b/lib/install.sh index f31b429..c63f528 100755 --- a/lib/install.sh +++ b/lib/install.sh @@ -372,12 +372,12 @@ function miaou_resolver() { gateway=$(ip route | grep default | cut -d' ' -f3) echo -n "test gateway <$gateway> as DNS resolver..." - if dig +short "@$gateway" "$FDN_DOMAINNAME" >/dev/null; then + if dig +short "@$gateway" "$DEFAULT_RESOLVER" >/dev/null; then resolver="$gateway" PREFIX="" echoinfo DONE else - PREFIX="" echoinfo "finally replaced by FDN_RESOLVER=<$FDN_RESOLVER>" - resolver="$FDN_RESOLVER" + PREFIX="" echoinfo "finally replaced by DEFAULT_RESOLVER=<$DEFAULT_RESOLVER>" + resolver="$DEFAULT_RESOLVER" fi if command -v nmcli &>/dev/null; then diff --git a/scripts/miaou b/scripts/miaou index 53701f0..827cc4f 100755 --- a/scripts/miaou +++ b/scripts/miaou @@ -195,7 +195,7 @@ function build_dmz_certbot { #TODO: check public ip available my_ip=$(dig +short myip.opendns.com @resolver1.opendns.com) public_hostname=$(hostname -f) - public_ip=$(dig +short A "${public_hostname}" "@${FDN_NAMESERVER}") + public_ip=$(dig +short A "${public_hostname}" "@${DEFAULT_RESOLVER}") if hostname -I | grep -q "$my_ip"; then echo "My PUBLIC IP address is: <$my_ip>"