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

Merge pull request #6 from jacobsalmela/development

Development
This commit is contained in:
Dan Schaper 2015-12-06 14:36:55 -08:00
commit dfc317124c

View File

@ -12,8 +12,8 @@ if [[ -f $piholeIPfile ]];then
rm $piholeIPfile rm $piholeIPfile
else 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 # 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 '{print $5}') 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}') piholeIPCIDR=$(ip -o -f inet addr show dev $IPv4dev | awk '{print $4}' | awk 'END {print}')
piholeIP=${piholeIPCIDR%/*} piholeIP=${piholeIPCIDR%/*}
fi fi