From 175d32c5f660a03368be40bb931a3752bb24643c Mon Sep 17 00:00:00 2001 From: Adam Warner Date: Wed, 11 Mar 2020 18:55:43 +0000 Subject: [PATCH] Set nameservers to be that which have been chosen by the user in the whiptail Signed-off-by: Adam Warner --- automated install/basic-install.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/automated install/basic-install.sh b/automated install/basic-install.sh index b896eb35..35d4df9f 100755 --- a/automated install/basic-install.sh +++ b/automated install/basic-install.sh @@ -854,7 +854,8 @@ setDHCPCD() { # we can append these lines to dhcpcd.conf to enable a static IP echo "interface ${PIHOLE_INTERFACE} static ip_address=${IPV4_ADDRESS} - static routers=${IPv4gw}" | tee -a /etc/dhcpcd.conf >/dev/null + static routers=${IPv4gw} + static domain_name_servers=${PIHOLE_DNS_1},${PIHOLE_DNS_2}" | tee -a /etc/dhcpcd.conf >/dev/null # Then use the ip command to immediately set the new address ip addr replace dev "${PIHOLE_INTERFACE}" "${IPV4_ADDRESS}" # Also give a warning that the user may need to reboot their system