Skip to content

Commit

Permalink
proxydhcp - get container IP differently
Browse files Browse the repository at this point in the history
  • Loading branch information
rjocoleman committed Jan 14, 2025
1 parent 426e3bd commit 243f53c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion root/init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ if [[ ! -f /config/dnsmasq/dnsmasq.conf ]]; then

# Get the container's IP address using hostname if not already set
if [ -z "${CONTAINER_IP}" ]; then
CONTAINER_IP=$(hostname -i)
CONTAINER_IP=$(ip -4 addr show eth0 | awk '/inet / {print $2}' | cut -d/ -f1)
export CONTAINER_IP
fi
envsubst '${DHCP_RANGE_START} ${CONTAINER_IP}' </defaults/dnsmasq-dhcpproxy.conf >>/config/dnsmasq/dnsmasq.conf
Expand Down

0 comments on commit 243f53c

Please sign in to comment.