1
0
mirror of https://github.com/pi-hole/pi-hole synced 2025-01-03 12:40:56 +00:00

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() {
#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}"