From 78cb0c4a578557de6292dd4b5d8d7b75a3fc8f18 Mon Sep 17 00:00:00 2001 From: diginc Date: Tue, 23 May 2017 09:22:16 -0500 Subject: [PATCH] reseed original config if using volume --- bash_functions.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/bash_functions.sh b/bash_functions.sh index 5f08435..831f516 100644 --- a/bash_functions.sh +++ b/bash_functions.sh @@ -66,8 +66,16 @@ setup_dnsmasq_interface() { [ -n "$INTERFACE" ] && change_setting "PIHOLE_INTERFACE" "${INTERFACE}" } +setup_dnsmasq_config_if_missing() { + # When fresh empty directory volumes are used we miss this file + if [ ! -f /etc/dnsmasq.d/01-pihole.conf ] ; then + cp /etc/.pihole/advanced/01-pihole.conf /etc/dnsmasq.d/ + fi; +} + setup_dnsmasq() { # Coordinates + setup_dnsmasq_config_if_missing setup_dnsmasq_dns "$DNS1" "$DNS2" setup_dnsmasq_interface "$INTERFACE" ProcessDNSSettings