Per #242, make addon port config reflected in wg0.conf

This commit is contained in:
doron1 2023-05-28 02:23:11 +03:00 committed by GitHub
parent db84c81618
commit 350eceb7e7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -133,12 +133,14 @@ if bashio::config.has_value 'server.post_down'; then
fi
fi
port=$(bashio::addon.port "51820")
# Finish up the main server configuration
{
echo "PrivateKey = ${server_private_key}"
# Adds server port to the configuration
echo "ListenPort = 51820"
echo "ListenPort = ${port}"
# Custom routing table
bashio::config.has_value "server.table" && echo "Table = ${table}"
@ -186,7 +188,6 @@ for peer in $(bashio::config 'peers|keys'); do
endpoint=$(bashio::config "peers[${peer}].endpoint")
fwmark=$(bashio::config "peers[${peer}].fwmark")
host=$(bashio::config 'server.host')
port=$(bashio::addon.port "51820/udp")
pre_shared_key=$(bashio::config "peers[${peer}].pre_shared_key")
# Create directory for storing client configuration