cluster: allow empty wgN.conf files as markers to enable the ring

Signed-off-by: Alejandro Mery <amery@jpi.io>
This commit is contained in:
2023-10-27 16:39:46 +00:00
parent 9ab7594bcc
commit 543824a54a
2 changed files with 23 additions and 11 deletions
+6 -4
View File
@@ -175,10 +175,12 @@ func (p interfaceConfig) Export() (InterfaceConfig, error) {
ListenPort: p.ListenPort,
}
out.PrivateKey, err = PrivateKeyFromBase64(p.PrivateKey)
if err != nil {
err = core.Wrap(err, "PrivateKey")
return InterfaceConfig{}, err
if p.PrivateKey != "" {
out.PrivateKey, err = PrivateKeyFromBase64(p.PrivateKey)
if err != nil {
err = core.Wrap(err, "PrivateKey")
return InterfaceConfig{}, err
}
}
return out, nil