Browse Source

zones: inject trailing new lines on Machine.WriteWireguardKeys()

Signed-off-by: Alejandro Mery <amery@jpi.io>
pull/1/head
Alejandro Mery 1 year ago
parent
commit
1859c8e04b
  1. 4
      pkg/zones/machine_rings.go

4
pkg/zones/machine_rings.go

@ -92,12 +92,12 @@ func (m *Machine) WriteWireguardKeys(ring int) error {
pub = ri.Keys.PrivateKey.Public().String()
}
err = m.WriteStringFile(key, "wg%v.key", ring)
err = m.WriteStringFile(key+"\n", "wg%v.key", ring)
if err != nil {
return err
}
err = m.WriteStringFile(pub, "wg%v.pub", ring)
err = m.WriteStringFile(pub+"\n", "wg%v.pub", ring)
if err != nil {
return err
}

Loading…
Cancel
Save