1
0
mirror of https://github.com/moparisthebest/pi-hole synced 2024-12-22 15:18:50 -05:00

new command to print both the IPv4 and IPv6 address on their own line

I'm not 100% sure if you can add multiple IP addresses to one domain on
a single line, so I just broke it up into two.  It makes the file
bigger and longer, but I'll have to see how it works
This commit is contained in:
Jacob Salmela 2015-10-10 13:55:49 -05:00
parent e3c0fdfeb7
commit 88e6ce041d

View File

@ -137,7 +137,7 @@ function gravity_advanced()
echo "** $numberOf unique domains trapped in the event horizon."
# Format domain list as "192.168.x.x domain.com"
echo "** Formatting domains into a HOSTS file..."
cat $origin/$eventHorizon | awk '{sub(/\r$/,""); print "'"$piholeIP"'" $0}' > $origin/$accretionDisc
cat $origin/$eventHorizon | awk '{sub(/\r$/,""); print "'"$piholeIPv4 "'" $0"\n""'"$piholeIPv6 "'" $0}'
# Copy the file over as /etc/pihole/gravity.list so dnsmasq can use it
sudo cp $origin/$accretionDisc $adList
kill -HUP $(pidof dnsmasq)