mirror of
https://github.com/gravitl/netmaker.git
synced 2024-11-12 04:25:08 +08:00
add error handling on failed key generation
This commit is contained in:
parent
81b75c78bd
commit
2531af49f2
1 changed files with 4 additions and 0 deletions
|
@ -97,6 +97,10 @@ var NodeUpdate mqtt.MessageHandler = func(client mqtt.Client, msg mqtt.Message)
|
|||
cfg.ReadConfig()
|
||||
nameserver := cfg.Server.CoreDNSAddr
|
||||
privateKey, err := wireguard.RetrievePrivKey(data.Network)
|
||||
if err != nil {
|
||||
ncutils.Log("error generating PrivateKey " + err.Error())
|
||||
return
|
||||
}
|
||||
if err := wireguard.UpdateWgInterface(cfg.Node.Interface, privateKey, nameserver, data); err != nil {
|
||||
ncutils.Log("error updating wireguard config " + err.Error())
|
||||
return
|
||||
|
|
Loading…
Reference in a new issue