mirror of
https://github.com/hassio-addons/addon-wireguard.git
synced 2025-05-04 19:01:31 +00:00
Per #242, make addon port config reflected in wg0.conf
This commit is contained in:
parent
db84c81618
commit
350eceb7e7
1 changed files with 3 additions and 2 deletions
|
@ -133,12 +133,14 @@ if bashio::config.has_value 'server.post_down'; then
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
port=$(bashio::addon.port "51820")
|
||||||
|
|
||||||
# Finish up the main server configuration
|
# Finish up the main server configuration
|
||||||
{
|
{
|
||||||
echo "PrivateKey = ${server_private_key}"
|
echo "PrivateKey = ${server_private_key}"
|
||||||
|
|
||||||
# Adds server port to the configuration
|
# Adds server port to the configuration
|
||||||
echo "ListenPort = 51820"
|
echo "ListenPort = ${port}"
|
||||||
|
|
||||||
# Custom routing table
|
# Custom routing table
|
||||||
bashio::config.has_value "server.table" && echo "Table = ${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")
|
endpoint=$(bashio::config "peers[${peer}].endpoint")
|
||||||
fwmark=$(bashio::config "peers[${peer}].fwmark")
|
fwmark=$(bashio::config "peers[${peer}].fwmark")
|
||||||
host=$(bashio::config 'server.host')
|
host=$(bashio::config 'server.host')
|
||||||
port=$(bashio::addon.port "51820/udp")
|
|
||||||
pre_shared_key=$(bashio::config "peers[${peer}].pre_shared_key")
|
pre_shared_key=$(bashio::config "peers[${peer}].pre_shared_key")
|
||||||
|
|
||||||
# Create directory for storing client configuration
|
# Create directory for storing client configuration
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue