up
This commit is contained in:
parent
f4c72cd3ca
commit
3d2d39e77d
6 changed files with 9 additions and 9 deletions
|
@ -17,7 +17,7 @@ RUN make build
|
|||
RUN make install
|
||||
|
||||
RUN cp ./docker/docker.yaml /etc/crowdsec/docker.yaml
|
||||
RUN cp ./docker/acquis.yaml /etc/crowdsec/crowdsec/
|
||||
RUN cp ./docker/acquis.yaml /etc/crowdsec/config/
|
||||
|
||||
############################
|
||||
# STEP 2
|
||||
|
@ -52,7 +52,7 @@ COPY ./docker/rsyslog.conf /etc/rsyslog.conf
|
|||
###########################################
|
||||
|
||||
RUN cscli config token "6ba94afde0fbf41310f7191934bc1d920245c9f1"
|
||||
RUN cscli config installdir "/etc/crowdsec/crowdsec/"
|
||||
RUN cscli config installdir "/etc/crowdsec/config/"
|
||||
RUN cscli config dbpath "/var/run/crowdsec/crowdsec.db"
|
||||
|
||||
RUN cscli update
|
||||
|
|
|
@ -29,11 +29,11 @@ type cliConfig struct {
|
|||
func interactiveCfg() error {
|
||||
var err error
|
||||
reader := bufio.NewReader(os.Stdin)
|
||||
fmt.Print("crowdsec installation directory (default: /etc/crowdsec/crowdsec/): ")
|
||||
fmt.Print("crowdsec installation directory (default: /etc/crowdsec/config/): ")
|
||||
config.InstallFolder, err = reader.ReadString('\n')
|
||||
config.InstallFolder = strings.Replace(config.InstallFolder, "\n", "", -1) //CRLF to LF (windows)
|
||||
if config.InstallFolder == "" {
|
||||
config.InstallFolder = "/etc/crowdsec/crowdsec/"
|
||||
config.InstallFolder = "/etc/crowdsec/config/"
|
||||
}
|
||||
if err != nil {
|
||||
log.Fatalf("failed to read input : %v", err.Error())
|
||||
|
@ -131,7 +131,7 @@ If no commands are specified, config is in interactive mode.`,
|
|||
var cmdConfigInstalldir = &cobra.Command{
|
||||
Use: "installdir [value]",
|
||||
Short: `Configure installation directory`,
|
||||
Long: `Configure the installation directory of crowdsec, such as /etc/crowdsec/crowdsec/`,
|
||||
Long: `Configure the installation directory of crowdsec, such as /etc/crowdsec/config/`,
|
||||
Args: cobra.ExactArgs(1),
|
||||
Run: func(cmd *cobra.Command, args []string) {
|
||||
config.InstallFolder = args[0]
|
||||
|
|
|
@ -4,7 +4,7 @@ Configure installation directory
|
|||
|
||||
### Synopsis
|
||||
|
||||
Configure the installation directory of crowdsec, such as /etc/crowdsec/crowdsec/
|
||||
Configure the installation directory of crowdsec, such as /etc/crowdsec/config/
|
||||
|
||||
```
|
||||
cscli config installdir [value] [flags]
|
||||
|
|
|
@ -7,7 +7,7 @@ GOGET=$(GOCMD) get
|
|||
|
||||
CROWDSEC_BIN=crowdsec
|
||||
PREFIX?="/"
|
||||
CFG_PREFIX = $(PREFIX)"/etc/crowdsec/crowdsec/"
|
||||
CFG_PREFIX = $(PREFIX)"/etc/crowdsec/config/"
|
||||
BIN_PREFIX = $(PREFIX)"/usr/local/bin/"
|
||||
DATA_PREFIX = $(PREFIX)"/var/run/crowdsec/"
|
||||
PID_DIR = $(PREFIX)"/var/run/"
|
||||
|
|
|
@ -105,7 +105,7 @@
|
|||
"Profiling": false,
|
||||
"OverflowFilter": "",
|
||||
"BucketName": "lingering-river",
|
||||
"Filename": "/home/bui/github/crowdsec/crowdsec/pkg/leakybucket/tests/simple-leaky-uniq-w-buckets_state/bucket.yaml"
|
||||
"Filename": "/home/bui/github/crowdsec/config/pkg/leakybucket/tests/simple-leaky-uniq-w-buckets_state/bucket.yaml"
|
||||
},
|
||||
"Duration": 40000000000,
|
||||
"Profiling": false
|
||||
|
|
|
@ -462,7 +462,7 @@ main() {
|
|||
|
||||
|
||||
# api register
|
||||
${CSCLI_BIN_INSTALLED} api register >> /etc/crowdsec/crowdsec/api.yaml || ${CSCLI_BIN_INSTALLED} api reset >> /etc/crowdsec/crowdsec/api.yaml || log_err "unable to register, skipping crowdsec api registration"
|
||||
${CSCLI_BIN_INSTALLED} api register >> /etc/crowdsec/config/api.yaml || ${CSCLI_BIN_INSTALLED} api reset >> /etc/crowdsec/config/api.yaml || log_err "unable to register, skipping crowdsec api registration"
|
||||
log_info "Crowdsec api registered"
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue