From 9a167b5acba29832d9d5558bde2f22fa336e1c98 Mon Sep 17 00:00:00 2001 From: Owen Date: Fri, 2 May 2025 14:16:10 -0400 Subject: [PATCH] Dont overwrite the secret and crowdsec vars --- install/main.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/install/main.go b/install/main.go index abb67acd..a0d74a43 100644 --- a/install/main.go +++ b/install/main.go @@ -64,15 +64,15 @@ func main() { } var config Config - config.DoCrowdsecInstall = false - config.Secret = generateRandomSecretKey() - + // check if there is already a config file if _, err := os.Stat("config/config.yml"); err != nil { config = collectUserInput(reader) - + loadVersions(&config) - + config.DoCrowdsecInstall = false + config.Secret = generateRandomSecretKey() + if err := createConfigFiles(config); err != nil { fmt.Printf("Error creating config files: %v\n", err) os.Exit(1)