mirror of
https://github.com/unraid/webgui.git
synced 2026-04-22 10:08:25 -05:00
Docker: fix WG routes added to the correct interface (br0 or eth0 or bond0)
This commit is contained in:
+1
-1
@@ -190,7 +190,7 @@ container_add_route(){
|
||||
local PID=${CT[0]}
|
||||
local NET=${CT[1]#*[}
|
||||
local LAN=${NET%:*}
|
||||
if [[ $PID -gt 0 && ($LAN == br0 || $LAN == eth0) ]]; then
|
||||
if [[ $PID -gt 0 && "${LAN//[^[0-9]/}" == "0" ]]; then
|
||||
local THISIP=$(sed -n '/^\[eth0\]$/,/^TYPE/p' $INI | grep -Pom1 '^IPADDR:0="\K[^"]+')
|
||||
for CFG in /etc/wireguard/wg*.cfg ; do
|
||||
local NETWORK=$(grep -Pom1 '^Network:0="\K[^"]+' $CFG)
|
||||
|
||||
Reference in New Issue
Block a user