mirror of
https://github.com/hassio-addons/addon-wireguard.git
synced 2025-05-05 03:11:22 +00:00
🚑 Create client config directory before using it
This commit is contained in:
parent
28269a05a9
commit
c42bd30cb7
1 changed files with 4 additions and 2 deletions
|
@ -142,6 +142,10 @@ for peer in $(bashio::config 'peers|keys'); do
|
||||||
pre_shared_key=$(bashio::config "peers[${peer}].pre_shared_key")
|
pre_shared_key=$(bashio::config "peers[${peer}].pre_shared_key")
|
||||||
endpoint=$(bashio::config "peers[${peer}].endpoint")
|
endpoint=$(bashio::config "peers[${peer}].endpoint")
|
||||||
|
|
||||||
|
# Create directory for storing client configuration
|
||||||
|
mkdir -p "${config_dir}" ||
|
||||||
|
bashio::exit.nok "Failed creating client folder for ${name}"
|
||||||
|
|
||||||
# Get the private key
|
# Get the private key
|
||||||
peer_private_key=""
|
peer_private_key=""
|
||||||
if bashio::config.has_value "peers[${peer}].private_key"; then
|
if bashio::config.has_value "peers[${peer}].private_key"; then
|
||||||
|
@ -201,8 +205,6 @@ for peer in $(bashio::config 'peers|keys'); do
|
||||||
} >> "${CONFIG}"
|
} >> "${CONFIG}"
|
||||||
|
|
||||||
# Generate client configuration
|
# Generate client configuration
|
||||||
mkdir -p "${config_dir}" ||
|
|
||||||
bashio::exit.nok "Failed creating client folder for ${name}"
|
|
||||||
|
|
||||||
# Determine allowed IPs for client configuration
|
# Determine allowed IPs for client configuration
|
||||||
allowed_ips="0.0.0.0/0"
|
allowed_ips="0.0.0.0/0"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue