Skip to content

Commit

Permalink
Bind on all interfaces (#253)
Browse files Browse the repository at this point in the history
Co-authored-by: Franck Nijhof <frenck@frenck.nl>
  • Loading branch information
rondoval and frenck committed Dec 19, 2021
1 parent 2953df0 commit 20953f3
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions adguard/rootfs/etc/cont-init.d/adguard.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
# ==============================================================================
readonly CONFIG="/data/adguard/AdGuardHome.yaml"
declare schema_version
declare -a interfaces
declare -a hosts
declare part
declare fd
Expand Down Expand Up @@ -48,8 +49,11 @@ else
fi

# Collect IP addresses
hosts+=($(bashio::network.ipv4_address))
hosts+=($(bashio::network.ipv6_address))
interfaces+=($(bashio::network.interfaces))
for interface in "${interfaces[@]}"; do
hosts+=($(bashio::network.ipv4_address "${interface}"))
hosts+=($(bashio::network.ipv6_address "${interface}"))
done
hosts+=($(bashio::addon.ip_address))

# Add interface to bind to, to AdGuard Home
Expand Down

0 comments on commit 20953f3

Please sign in to comment.