change nic
Some checks failed
Test / test (push) Has been cancelled

This commit is contained in:
2025-12-28 13:52:20 +00:00
parent 022c455334
commit 03c1181186

View File

@@ -6,10 +6,10 @@
set -e set -e
# Pick the outbound interface based on the container's default route. # Pick the outbound interface based on the container's default route.
# (In Docker, this is not always eth0 when multiple networks are attached.) # (In Docker, this is not always eth1 when multiple networks are attached.)
WAN_IF="$(ip route show default 0.0.0.0/0 2>/dev/null | awk '{for(i=1;i<=NF;i++) if($i=="dev"){print $(i+1); exit}}')" WAN_IF="$(ip route show default 0.0.0.0/0 2>/dev/null | awk '{for(i=1;i<=NF;i++) if($i=="dev"){print $(i+1); exit}}')"
if [ -z "${WAN_IF}" ]; then if [ -z "${WAN_IF}" ]; then
WAN_IF="eth0" WAN_IF="eth1"
fi fi
# Create bridge if not exists # Create bridge if not exists