🚑 Fixes an issue with a peer keypair not being generated

This commit is contained in:
Franck Nijhof 2019-08-30 12:07:58 +02:00
parent 127255380e
commit c4f17fee94
No known key found for this signature in database
GPG key ID: D62583BA8AB11CA3

View file

@ -185,7 +185,7 @@ for peer in $(bashio::config 'peers|keys'); do
elif ! bashio::config.has_value "peers[${peer}].public_key"; then
# If a public key is not provided, try get a private key from disk
# or generate one if needed.
if ! bashio::fs.file_exists '/ssl/wireguard/private_key'; then
if ! bashio::fs.file_exists "${config_dir}/private_key"; then
umask 077 || bashio::exit.nok "Could not set a proper umask"
wg genkey > "${config_dir}/private_key" ||
bashio::exit.nok "Could not generate private key for ${name}!"