From 3d2d39e77d68304a33fb3fa672e2c1126c067d6a Mon Sep 17 00:00:00 2001 From: Thibault bui Koechlin Date: Fri, 15 May 2020 12:13:57 +0200 Subject: [PATCH] up --- Dockerfile | 4 ++-- cmd/crowdsec-cli/config.go | 6 +++--- cmd/crowdsec-cli/doc/cwcli_config_installdir.md | 2 +- cmd/crowdsec/Makefile | 2 +- .../simple-leaky-uniq-w-buckets_state/in-buckets_state.json | 2 +- wizard.sh | 2 +- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/Dockerfile b/Dockerfile index cf30b3840..de72e7096 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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 diff --git a/cmd/crowdsec-cli/config.go b/cmd/crowdsec-cli/config.go index f5ce82c5f..8dec02147 100644 --- a/cmd/crowdsec-cli/config.go +++ b/cmd/crowdsec-cli/config.go @@ -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] diff --git a/cmd/crowdsec-cli/doc/cwcli_config_installdir.md b/cmd/crowdsec-cli/doc/cwcli_config_installdir.md index a29112a52..ba6266e8f 100644 --- a/cmd/crowdsec-cli/doc/cwcli_config_installdir.md +++ b/cmd/crowdsec-cli/doc/cwcli_config_installdir.md @@ -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] diff --git a/cmd/crowdsec/Makefile b/cmd/crowdsec/Makefile index 4fe8797b5..db92a2f99 100644 --- a/cmd/crowdsec/Makefile +++ b/cmd/crowdsec/Makefile @@ -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/" diff --git a/pkg/leakybucket/tests/simple-leaky-uniq-w-buckets_state/in-buckets_state.json b/pkg/leakybucket/tests/simple-leaky-uniq-w-buckets_state/in-buckets_state.json index 88b0b645d..dee5f242d 100644 --- a/pkg/leakybucket/tests/simple-leaky-uniq-w-buckets_state/in-buckets_state.json +++ b/pkg/leakybucket/tests/simple-leaky-uniq-w-buckets_state/in-buckets_state.json @@ -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 diff --git a/wizard.sh b/wizard.sh index 67195f73d..735adc487 100755 --- a/wizard.sh +++ b/wizard.sh @@ -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"