AlteredCoder 5 лет назад
Родитель
Сommit
06e6ac7757
5 измененных файлов с 14 добавлено и 7 удалено
  1. 3 3
      cmd/crowdsec-cli/backup-restore.go
  2. 1 1
      cmd/crowdsec-cli/main.go
  3. 1 1
      config/config.yaml
  4. 4 1
      nfpm.yaml
  5. 5 1
      scripts/post_install_deb.sh

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

@@ -339,10 +339,10 @@ func backupToDirectory(target string) error {
 	}
 	log.Infof("Saved acquis to %s", bac)
 	/*
-		Backup default.yaml
+		Backup config.yaml
 	*/
-	defyaml := fmt.Sprintf("%s/default.yaml", config.InstallFolder)
-	bac = fmt.Sprintf("%s/default.yaml", target)
+	defyaml := fmt.Sprintf("%s/config.yaml", config.InstallFolder)
+	bac = fmt.Sprintf("%s/config.yaml", target)
 	if err = copyFile(defyaml, bac); err != nil {
 		return fmt.Errorf("failed copy %s to %s : %s", yamlAcquisFile, bac, err)
 	}

+ 1 - 1
cmd/crowdsec-cli/main.go

@@ -113,7 +113,7 @@ API interaction:
 	rootCmd.AddCommand(cmdVersion)
 
 	//rootCmd.PersistentFlags().BoolVarP(&config.simulation, "simulate", "s", false, "No action; perform a simulation of events that would occur based on the current arguments.")
-	rootCmd.PersistentFlags().StringVarP(&config.ConfigFilePath, "config", "c", "/etc/crowdsec/config/default.yaml", "path to crowdsec config file (default: /etc/crowdsec/config/default.yaml)")
+	rootCmd.PersistentFlags().StringVarP(&config.ConfigFilePath, "config", "c", "/etc/crowdsec/config/config.yaml", "path to crowdsec config file (default: /etc/crowdsec/config/config.yaml)")
 
 	rootCmd.PersistentFlags().StringVarP(&config.output, "output", "o", "human", "Output format : human, json, raw.")
 	rootCmd.PersistentFlags().BoolVar(&dbg_lvl, "debug", false, "Set logging to debug.")

+ 1 - 1
config/config.yaml

@@ -2,7 +2,7 @@ working_dir: /tmp/
 data_dir: /var/lib/crowdsec/data
 config_dir: /etc/crowdsec/config/
 pid_dir: /var/run/
-log_dir: /var/log/crowdsec/
+log_dir: /var/log/
 cscli_dir: /etc/crowdsec/config/cscli
 log_mode: file
 log_level: info

+ 4 - 1
nfpm.yaml

@@ -39,9 +39,12 @@ files:
   ./config/profiles.yaml: "/etc/crowdsec/config/profiles.yaml"
   ./config/user.yaml: "/etc/crowdsec/config/user.yaml"
   ./config/patterns/* : "/etc/crowdsec/config/patterns/"
+  ./plugins/backend/*.so: "/usr/local/lib/crowdsec/plugins/backend"
+  ./config/plugins/backend/*.yaml: "/etc/crowdsec/plugins/backend"
 
 empty_folders:
-  - /var/log/crowdsec/
+  - /etc/crowdsec/config/cscli
+  - /var/lib/crowdsec/data/
 overrides:
 #  rpm:
 #    scripts:

+ 5 - 1
scripts/post_install_deb.sh

@@ -1 +1,5 @@
-systemctl daemon-reload
+systemctl daemon-reload
+cscli update
+cscli install collection crowdsecurity/linux
+cscli install scenario crowdsecurity/ssh-bf
+systemctl start crowdsec