mirror of
https://github.com/pi-hole/pi-hole.git
synced 2024-12-25 06:10:20 +00:00
Only try to remove parts inthe file if the file already exists
This commit is contained in:
parent
ec8c848106
commit
7872f68a45
1 changed files with 3 additions and 1 deletions
|
@ -873,7 +873,9 @@ configureFirewall() {
|
||||||
|
|
||||||
finalExports() {
|
finalExports() {
|
||||||
# Update variables in setupVars.conf file
|
# Update variables in setupVars.conf file
|
||||||
sed -i.update.bak '/PIHOLE_DOMAIN/d;/IPV4_ADDRESS/d;/IPV6_ADDRESS/d;/PIHOLE_DNS_1/d;/PIHOLE_DNS_2/d;/QUERY_LOGGING/d;' "${setupVars}"
|
if [ -e "${setupVars}" ]; then
|
||||||
|
sed -i.update.bak '/PIHOLE_DOMAIN/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}"
|
echo "PIHOLE_INTERFACE=${PIHOLE_INTERFACE}"
|
||||||
echo "IPV4_ADDRESS=${IPV4_ADDRESS}"
|
echo "IPV4_ADDRESS=${IPV4_ADDRESS}"
|
||||||
|
|
Loading…
Reference in a new issue