You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Script determines correct current IPv4 and IPv6 addresses
Actual Behavior
When I execute the following command
echo "${IP:-$(ip route get 8.8.8.8 | awk '{ print $NF; exit }')}"
the returned value is "1000"
When I execute the following command from the script
echo "${IPv6:-$(ip -6 route get 2001:4860:4860::8888 | awk '{ print $10; exit }')}"
the returned value is "src"
Possible Fix
I'm using Ubuntu Bionic - perhaps the return format of the route command changed
When the auto lookup fails please just delete the whole first 4 IP lines and type in your IP to the variables like so:
IP="MyIP"
IPv6="MyIPv6"
The Lookup of IPs is a convenience thing for the majority of users. Like eku said it varies by platform. To make it 100% we'd need to know all the various platforms/network variants' outputs for the route get command.
Auto detection of the IPv4 address in the script on docker hub didn't work for me, since uid is the field of the ip route result. I solved it by using the same awk program as for IPv6:
$(ip route get 8.8.8.8 | awk '{for(i=1;i<=NF;i++) if ($i=="src") print $(i+1)}')
This is a...
Description
The startup script found here: https://github.com/diginc/docker-pi-hole/blob/master/docker_run.sh
doesn't seem to be able to grab IP addresses correctly
Expected Behavior
Script determines correct current IPv4 and IPv6 addresses
Actual Behavior
When I execute the following command
echo "${IP:-$(ip route get 8.8.8.8 | awk '{ print $NF; exit }')}"
the returned value is "1000"
When I execute the following command from the script
echo "${IPv6:-$(ip -6 route get 2001:4860:4860::8888 | awk '{ print $10; exit }')}"
the returned value is "src"
Possible Fix
I'm using Ubuntu Bionic - perhaps the return format of the route command changed
Steps to Reproduce and debugging done
Debug steps I have tried
docker run
example in the readme (removing any customizations I added)Context and extra information
Your Environment
The text was updated successfully, but these errors were encountered: