From 1859c8e04b875cedd6e12f700d4fb7794dfbf484 Mon Sep 17 00:00:00 2001 From: Alejandro Mery Date: Fri, 25 Aug 2023 21:17:54 +0000 Subject: [PATCH] zones: inject trailing new lines on Machine.WriteWireguardKeys() Signed-off-by: Alejandro Mery --- pkg/zones/machine_rings.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/zones/machine_rings.go b/pkg/zones/machine_rings.go index 1e950e8..bd67099 100644 --- a/pkg/zones/machine_rings.go +++ b/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 }