mirror of
https://github.com/pi-hole/pi-hole.git
synced 2024-11-15 02:42:58 +00:00
Ensure addn-hosts value is updated in /etc/dnsmasq.d/01-pihole.conf if user has a custom value set in pihole.conf
This commit is contained in:
parent
0bbfb323b1
commit
c6405bc93b
1 changed files with 6 additions and 0 deletions
|
@ -321,6 +321,12 @@ function gravity_reload() {
|
|||
# Reload hosts file
|
||||
echo ":::"
|
||||
echo -n "::: Refresh lists in dnsmasq..."
|
||||
|
||||
#ensure /etc/dnsmasq.d/01-pihole.conf is pointing at the correct list!
|
||||
#First escape forward slashes in the path:
|
||||
adList=${adList//\//\\\/}
|
||||
#Now replace the line in dnsmasq file
|
||||
$SUDO sed -i "s/^addn-hosts.*/addn-hosts=$adlist/" /etc/dnsmasq.d/01-pihole.conf
|
||||
dnsmasqPid=$(pidof dnsmasq)
|
||||
|
||||
find "$piholeDir" -type f -exec $SUDO chmod 666 {} \; & spinner $!
|
||||
|
|
Loading…
Reference in a new issue