Merge pull request #990 from pi-hole/dontkillsetupVars.conf

Don't kill setupVars.conf on update/fresh install
This commit is contained in:
Adam Warner 2016-12-16 13:55:33 +00:00 committed by GitHub
commit 10982a0f45

View file

@ -872,9 +872,9 @@ configureFirewall() {
} }
finalExports() { finalExports() {
#If it already exists, lets overwrite it with the new values. # Update variables in setupVars.conf file
if [[ -f ${setupVars} ]]; then if [ -e "${setupVars}" ]; then
rm ${setupVars} 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 fi
{ {
echo "PIHOLE_INTERFACE=${PIHOLE_INTERFACE}" echo "PIHOLE_INTERFACE=${PIHOLE_INTERFACE}"