mirror of
https://github.com/pi-hole/pi-hole.git
synced 2024-11-15 10:43:55 +00:00
new variables for IPv4 and IPv6
The IPv6 address looks for the one created from the MAC address.
This commit is contained in:
parent
dfbf1a952f
commit
e3c0fdfeb7
1 changed files with 2 additions and 1 deletions
|
@ -3,7 +3,8 @@
|
||||||
# Compiles a list of ad-serving domains by downloading them from multiple sources
|
# Compiles a list of ad-serving domains by downloading them from multiple sources
|
||||||
|
|
||||||
# This script should only be run after you have a static IP address set on the Pi
|
# This script should only be run after you have a static IP address set on the Pi
|
||||||
piholeIP=$(hostname -I)
|
piholeIPv4=$(ip addr show | awk '{match($0,/[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+/); ip = substr($0,RSTART,RLENGTH); print ip}' | sed '/^\s*$/d' | grep -v "127.0.0.1")
|
||||||
|
piholeIPv6=$(ip addr show | awk '/scope\ global/ && /ff:fe/ {print $2}' | cut -d'/' -f1)
|
||||||
|
|
||||||
# Ad-list sources--one per line in single quotes
|
# Ad-list sources--one per line in single quotes
|
||||||
sources=('https://adaway.org/hosts.txt'
|
sources=('https://adaway.org/hosts.txt'
|
||||||
|
|
Loading…
Reference in a new issue