From 8310c10ce37ea455ca43b11efe57d640bbb86060 Mon Sep 17 00:00:00 2001 From: mmetc <92726601+mmetc@users.noreply.github.com> Date: Fri, 21 Jan 2022 11:52:23 +0100 Subject: [PATCH] console_config.yaml -> console.yaml (#1195) --- config/config.yaml | 2 +- config/{console_config.yaml => console.yaml} | 0 debian/rules | 2 +- pkg/csconfig/api_test.go | 2 +- pkg/csconfig/console.go | 2 +- rpm/SPECS/crowdsec.spec | 4 ++-- wizard.sh | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) rename config/{console_config.yaml => console.yaml} (100%) diff --git a/config/config.yaml b/config/config.yaml index afc771638..d5c0a11a2 100644 --- a/config/config.yaml +++ b/config/config.yaml @@ -41,7 +41,7 @@ api: log_level: info listen_uri: 127.0.0.1:8080 profiles_path: /etc/crowdsec/profiles.yaml - console_path: /etc/crowdsec/console_config.yaml + console_path: /etc/crowdsec/console.yaml online_client: # Central API credentials (to push signals and receive bad IPs) credentials_path: /etc/crowdsec/online_api_credentials.yaml # tls: diff --git a/config/console_config.yaml b/config/console.yaml similarity index 100% rename from config/console_config.yaml rename to config/console.yaml diff --git a/debian/rules b/debian/rules index 0af9e8c93..c48388b5b 100755 --- a/debian/rules +++ b/debian/rules @@ -47,5 +47,5 @@ override_dh_auto_install: cp config/config.yaml debian/crowdsec/etc/crowdsec/config.yaml cp config/simulation.yaml debian/crowdsec/etc/crowdsec/simulation.yaml cp config/profiles.yaml debian/crowdsec/etc/crowdsec/profiles.yaml - cp config/console_config.yaml debian/crowdsec/etc/crowdsec/console_config.yaml + cp config/console.yaml debian/crowdsec/etc/crowdsec/console.yaml cp -a config/patterns debian/crowdsec/etc/crowdsec diff --git a/pkg/csconfig/api_test.go b/pkg/csconfig/api_test.go index 730b5d172..208461fc2 100644 --- a/pkg/csconfig/api_test.go +++ b/pkg/csconfig/api_test.go @@ -207,7 +207,7 @@ func TestLoadAPIServer(t *testing.T) { DbPath: "./tests/test.db", Type: "sqlite", }, - ConsoleConfigPath: "/etc/crowdsec/console_config.yaml", + ConsoleConfigPath: "/etc/crowdsec/console.yaml", ConsoleConfig: &ConsoleConfig{ ShareManualDecisions: types.BoolPtr(false), ShareTaintedScenarios: types.BoolPtr(true), diff --git a/pkg/csconfig/console.go b/pkg/csconfig/console.go index b617e442a..b7bd1d010 100644 --- a/pkg/csconfig/console.go +++ b/pkg/csconfig/console.go @@ -17,7 +17,7 @@ const ( SEND_MANUAL_SCENARIOS = "manual" ) -var DefaultConsoleConfgFilePath = "/etc/crowdsec/console_config.yaml" +var DefaultConsoleConfgFilePath = "/etc/crowdsec/console.yaml" var CONSOLE_CONFIGS = []string{SEND_CUSTOM_SCENARIOS, SEND_MANUAL_SCENARIOS, SEND_TAINTED_SCENARIOS} diff --git a/rpm/SPECS/crowdsec.spec b/rpm/SPECS/crowdsec.spec index 70d0f446a..04aa66b55 100644 --- a/rpm/SPECS/crowdsec.spec +++ b/rpm/SPECS/crowdsec.spec @@ -61,7 +61,7 @@ install -m 644 -D config/patterns/* -t %{buildroot}%{_sysconfdir}/crowdsec/patte install -m 644 -D config/config.yaml %{buildroot}%{_sysconfdir}/crowdsec install -m 644 -D config/simulation.yaml %{buildroot}%{_sysconfdir}/crowdsec install -m 644 -D config/profiles.yaml %{buildroot}%{_sysconfdir}/crowdsec -install -m 644 -D config/console_config.yaml %{buildroot}%{_sysconfdir}/crowdsec +install -m 644 -D config/console.yaml %{buildroot}%{_sysconfdir}/crowdsec install -m 644 -D %{SOURCE1} %{buildroot}%{_presetdir} install -m 551 plugins/notifications/slack/notification-slack %{buildroot}%{_libdir}/%{name}/plugins/ @@ -112,7 +112,7 @@ rm -rf %{buildroot} %config(noreplace) %{_sysconfdir}/%{name}/config.yaml %config(noreplace) %{_sysconfdir}/%{name}/simulation.yaml %config(noreplace) %{_sysconfdir}/%{name}/profiles.yaml -%config(noreplace) %{_sysconfdir}/%{name}/console_config.yaml +%config(noreplace) %{_sysconfdir}/%{name}/console.yaml %config(noreplace) %{_presetdir}/80-%{name}.preset %config(noreplace) %{_sysconfdir}/%{name}/notifications/http.yaml %config(noreplace) %{_sysconfdir}/%{name}/notifications/slack.yaml diff --git a/wizard.sh b/wizard.sh index 21791e348..ee398aaaf 100755 --- a/wizard.sh +++ b/wizard.sh @@ -31,7 +31,7 @@ CSCLI_BIN="./cmd/crowdsec-cli/cscli" CLIENT_SECRETS="local_api_credentials.yaml" LAPI_SECRETS="online_api_credentials.yaml" -CONSOLE_FILE="console_config.yaml" +CONSOLE_FILE="console.yaml" BIN_INSTALL_PATH="/usr/local/bin" CROWDSEC_BIN_INSTALLED="${BIN_INSTALL_PATH}/crowdsec"