mirror of
https://github.com/moparisthebest/pi-hole
synced 2024-12-22 15:18:50 -05:00
Merge pull request #141 from iblamefish/ipv6
Fix bug in gravity.sh where IPv6 list was not always populated
This commit is contained in:
commit
a6b18feed9
@ -13,10 +13,6 @@
|
|||||||
piholeIPfile=/tmp/piholeIP
|
piholeIPfile=/tmp/piholeIP
|
||||||
piholeIPv6file=/etc/pihole/.useIPv6
|
piholeIPv6file=/etc/pihole/.useIPv6
|
||||||
if [[ -f $piholeIPfile ]];then
|
if [[ -f $piholeIPfile ]];then
|
||||||
if [[ -f $piholeIPv6file ]];then
|
|
||||||
# If the file exists, then the user previously chose to use IPv6 in the automated installer
|
|
||||||
piholeIPv6=$(ip -6 route get 2001:4860:4860::8888 | awk -F " " '{ for(i=1;i<=NF;i++) if ($i == "src") print $(i+1) }')
|
|
||||||
fi
|
|
||||||
# If the file exists, it means it was exported from the installation script and we should use that value instead of detecting it in this script
|
# If the file exists, it means it was exported from the installation script and we should use that value instead of detecting it in this script
|
||||||
piholeIP=$(cat $piholeIPfile)
|
piholeIP=$(cat $piholeIPfile)
|
||||||
rm $piholeIPfile
|
rm $piholeIPfile
|
||||||
@ -27,6 +23,11 @@ else
|
|||||||
piholeIP=${piholeIPCIDR%/*}
|
piholeIP=${piholeIPCIDR%/*}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [[ -f $piholeIPv6file ]];then
|
||||||
|
# If the file exists, then the user previously chose to use IPv6 in the automated installer
|
||||||
|
piholeIPv6=$(ip -6 route get 2001:4860:4860::8888 | awk -F " " '{ for(i=1;i<=NF;i++) if ($i == "src") print $(i+1) }')
|
||||||
|
fi
|
||||||
|
|
||||||
# Ad-list sources--one per line in single quotes
|
# Ad-list sources--one per line in single quotes
|
||||||
# The mahakala source is commented out due to many users having issues with it blocking legitimate domains.
|
# The mahakala source is commented out due to many users having issues with it blocking legitimate domains.
|
||||||
# Uncomment at your own risk
|
# Uncomment at your own risk
|
||||||
|
Loading…
Reference in New Issue
Block a user