update
This commit is contained in:
parent
e1048e1173
commit
06e6ac7757
5 changed files with 14 additions and 7 deletions
|
@ -339,10 +339,10 @@ func backupToDirectory(target string) error {
|
||||||
}
|
}
|
||||||
log.Infof("Saved acquis to %s", bac)
|
log.Infof("Saved acquis to %s", bac)
|
||||||
/*
|
/*
|
||||||
Backup default.yaml
|
Backup config.yaml
|
||||||
*/
|
*/
|
||||||
defyaml := fmt.Sprintf("%s/default.yaml", config.InstallFolder)
|
defyaml := fmt.Sprintf("%s/config.yaml", config.InstallFolder)
|
||||||
bac = fmt.Sprintf("%s/default.yaml", target)
|
bac = fmt.Sprintf("%s/config.yaml", target)
|
||||||
if err = copyFile(defyaml, bac); err != nil {
|
if err = copyFile(defyaml, bac); err != nil {
|
||||||
return fmt.Errorf("failed copy %s to %s : %s", yamlAcquisFile, bac, err)
|
return fmt.Errorf("failed copy %s to %s : %s", yamlAcquisFile, bac, err)
|
||||||
}
|
}
|
||||||
|
|
|
@ -113,7 +113,7 @@ API interaction:
|
||||||
rootCmd.AddCommand(cmdVersion)
|
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().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().StringVarP(&config.output, "output", "o", "human", "Output format : human, json, raw.")
|
||||||
rootCmd.PersistentFlags().BoolVar(&dbg_lvl, "debug", false, "Set logging to debug.")
|
rootCmd.PersistentFlags().BoolVar(&dbg_lvl, "debug", false, "Set logging to debug.")
|
||||||
|
|
|
@ -2,7 +2,7 @@ working_dir: /tmp/
|
||||||
data_dir: /var/lib/crowdsec/data
|
data_dir: /var/lib/crowdsec/data
|
||||||
config_dir: /etc/crowdsec/config/
|
config_dir: /etc/crowdsec/config/
|
||||||
pid_dir: /var/run/
|
pid_dir: /var/run/
|
||||||
log_dir: /var/log/crowdsec/
|
log_dir: /var/log/
|
||||||
cscli_dir: /etc/crowdsec/config/cscli
|
cscli_dir: /etc/crowdsec/config/cscli
|
||||||
log_mode: file
|
log_mode: file
|
||||||
log_level: info
|
log_level: info
|
||||||
|
|
|
@ -39,9 +39,12 @@ files:
|
||||||
./config/profiles.yaml: "/etc/crowdsec/config/profiles.yaml"
|
./config/profiles.yaml: "/etc/crowdsec/config/profiles.yaml"
|
||||||
./config/user.yaml: "/etc/crowdsec/config/user.yaml"
|
./config/user.yaml: "/etc/crowdsec/config/user.yaml"
|
||||||
./config/patterns/* : "/etc/crowdsec/config/patterns/"
|
./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:
|
empty_folders:
|
||||||
- /var/log/crowdsec/
|
- /etc/crowdsec/config/cscli
|
||||||
|
- /var/lib/crowdsec/data/
|
||||||
overrides:
|
overrides:
|
||||||
# rpm:
|
# rpm:
|
||||||
# scripts:
|
# scripts:
|
||||||
|
|
|
@ -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
|
Loading…
Add table
Reference in a new issue