From 21632654c143139b392e93acc89e82c44ed40b69 Mon Sep 17 00:00:00 2001 From: Mark Pashmfouroush Date: Thu, 23 May 2024 08:31:29 +0100 Subject: [PATCH] wgconf: fix creating warp identities when not using warp Signed-off-by: Mark Pashmfouroush --- main.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/main.go b/main.go index f75666d37..6f7796d36 100644 --- a/main.go +++ b/main.go @@ -183,9 +183,11 @@ func main() { opts.Endpoint = addrPort.String() } - // create identities - if err := createPrimaryAndSecondaryIdentities(l.With("subsystem", "warp/account"), opts); err != nil { - fatal(l, err) + if opts.WireguardConfig != "" { + // create identities + if err := createPrimaryAndSecondaryIdentities(l.With("subsystem", "warp/account"), opts); err != nil { + fatal(l, err) + } } ctx, _ := signal.NotifyContext(context.Background(), os.Interrupt, syscall.SIGTERM)