Quellcode durchsuchen

improve logging + fix bug in wizard (--upgrade)

erenJag vor 5 Jahren
Ursprung
Commit
dd632483fc
2 geänderte Dateien mit 4 neuen und 4 gelöschten Zeilen
  1. 1 1
      cmd/crowdsec-cli/backup-restore.go
  2. 3 3
      wizard.sh

+ 1 - 1
cmd/crowdsec-cli/backup-restore.go

@@ -415,7 +415,7 @@ cscli backup restore ./my-backup`,
 			}
 			outputCTX, err = outputs.NewOutput(&outputConfig, false)
 			if err != nil {
-				log.Fatalf("Failed to load output plugins")
+				log.Fatalf("Failed to load output plugins : %v", err)
 			}
 			if err := cwhub.GetHubIdx(); err != nil {
 				log.Fatalf("Failed to get Hub index : %v", err)

+ 3 - 3
wizard.sh

@@ -314,14 +314,14 @@ update_full() {
     fi
 
     log_info "Backing up existing configuration"
-    ${CSCLI_BIN} backup save ${BACKUP_DIR}
+    ${CSCLI_BIN_INSTALLED} backup save ${BACKUP_DIR}
     log_info "Cleanup existing crowdsec configuration"
     uninstall_crowdsec
     log_info "Installing crowdsec"
     install_crowdsec
     log_info "Restoring configuration"
-    ${CSCLI_BIN} update
-    ${CSCLI_BIN} backup restore ${BACKUP_DIR}
+    ${CSCLI_BIN_INSTALLED} update
+    ${CSCLI_BIN_INSTALLED} backup restore ${BACKUP_DIR}
     log_info "Finished, restarting"
     systemctl restart crowdsec || log_err "Failed to restart crowdsec"
 }