diff --git a/automated install/basic-install.sh b/automated install/basic-install.sh index 3f0ad705..8abf9af8 100755 --- a/automated install/basic-install.sh +++ b/automated install/basic-install.sh @@ -872,9 +872,9 @@ configureFirewall() { } finalExports() { - #If it already exists, lets overwrite it with the new values. - if [[ -f ${setupVars} ]]; then - rm ${setupVars} + # Update variables in setupVars.conf file + if [ -e "${setupVars}" ]; then + sed -i.update.bak '/PIHOLE_INTERFACE/d;/IPV4_ADDRESS/d;/IPV6_ADDRESS/d;/PIHOLE_DNS_1/d;/PIHOLE_DNS_2/d;/QUERY_LOGGING/d;' "${setupVars}" fi { echo "PIHOLE_INTERFACE=${PIHOLE_INTERFACE}"