🚑 Create client config directory before using it

This commit is contained in:
Franck Nijhof 2019-08-29 12:09:56 +02:00
parent 28269a05a9
commit c42bd30cb7
No known key found for this signature in database
GPG key ID: D62583BA8AB11CA3

View file

@ -142,6 +142,10 @@ for peer in $(bashio::config 'peers|keys'); do
pre_shared_key=$(bashio::config "peers[${peer}].pre_shared_key")
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
peer_private_key=""
if bashio::config.has_value "peers[${peer}].private_key"; then
@ -201,8 +205,6 @@ for peer in $(bashio::config 'peers|keys'); do
} >> "${CONFIG}"
# Generate client configuration
mkdir -p "${config_dir}" ||
bashio::exit.nok "Failed creating client folder for ${name}"
# Determine allowed IPs for client configuration
allowed_ips="0.0.0.0/0"