From ec719b01b6a8bbd0fd9ac21ea818a4f8ba0233ef Mon Sep 17 00:00:00 2001 From: Promofaux Date: Wed, 6 Apr 2016 22:31:34 +0100 Subject: [PATCH] actually add 0.0.0.0 in --- gravity.sh | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/gravity.sh b/gravity.sh index 51324c10..f3ad3c69 100755 --- a/gravity.sh +++ b/gravity.sh @@ -26,25 +26,14 @@ else fi fi -piholeIPfile=/tmp/piholeIP -piholeIPv6file=/etc/pihole/.useIPv6 adListFile=/etc/pihole/adlists.list adListDefault=/etc/pihole/adlists.default whitelistScript=/opt/pihole/whitelist.sh blacklistScript=/opt/pihole/blacklist.sh -if [[ -f $piholeIPfile ]];then - # 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) - rm $piholeIPfile -else - # Otherwise, the IP address can be taken directly from the machine, which will happen when the script is run by the user and not the installation script - IPv4dev=$(ip route get 8.8.8.8 | awk '{for(i=1;i<=NF;i++)if($i~/dev/)print $(i+1)}') - piholeIPCIDR=$(ip -o -f inet addr show dev "$IPv4dev" | awk '{print $4}' | awk 'END {print}') - piholeIP=${piholeIPCIDR%/*} -fi - +piholeIP="0.0.0.0" +piholeIPv6file=/etc/pihole/.useIPv6 if [[ -f $piholeIPv6file ]];then # If the file exists, then the user previously chose to use IPv6 in the automated installer piholeIPv6="::"