diff --git a/config/plugins/backend/sqlite.yaml b/config/plugins/backend/sqlite.yaml index c4250c15f..e2009270e 100644 --- a/config/plugins/backend/sqlite.yaml +++ b/config/plugins/backend/sqlite.yaml @@ -1,5 +1,5 @@ name: sqlite -path: /var/lib/crowdsec/plugins/backend/sqlite.so +path: /usr/local/crowdsec/plugins/backend/sqlite.so config: db_path: /var/lib/crowdsec/data/crowdsec.db flush: true diff --git a/docs/getting_started/installation.md b/docs/getting_started/installation.md index a7a5c1c01..627687638 100644 --- a/docs/getting_started/installation.md +++ b/docs/getting_started/installation.md @@ -65,6 +65,7 @@ You will need as well to configure your {{ref.acquis}} file to feed {{crowdsec.n * [Go](https://golang.org/doc/install) v1.13+ * `git clone {{crowdsec.url}}` + * [jq](https://stedolan.github.io/jq/download/) Go in {{crowdsec.name}} folder and build the binaries : diff --git a/docs/references/output.md b/docs/references/output.md index 04f1dc409..2a66f30d2 100644 --- a/docs/references/output.md +++ b/docs/references/output.md @@ -62,7 +62,7 @@ config: # in a form of key(string)/value(string) For the plugin sqlite, here is its configuration file: ```yaml name: sqlite -path: /var/lib/crowdsec/plugins/backend/sqlite.so +path: /usr/local/crowdsec/plugins/backend/sqlite.so config: db_path: /var/lib/crowdsec/data/crowdsec.db flush: true diff --git a/mkdocs.yml b/mkdocs.yml index b630cdd7e..b68709b7b 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -129,7 +129,7 @@ extra: plugins: name: blockers url: "https://hub.crowdsec.net/" - binpath: "/var/lib/crowdsec/plugins/" + binpath: "/usr/local/crowdsec/plugins/" configpath: "/etc/crowdsec/plugins/" metabase: name: metabase diff --git a/wizard.sh b/wizard.sh index 557e35fad..8197c6367 100755 --- a/wizard.sh +++ b/wizard.sh @@ -14,12 +14,13 @@ SILENT="false" CROWDSEC_RUN_DIR="/var/run" CROWDSEC_LIB_DIR="/var/lib/crowdsec" +CROWDSEC_USR_DIR="/usr/local/crowdsec" CROWDSEC_DATA_DIR="${CROWDSEC_LIB_DIR}/data" -CROWDSEC_PLUGIN_DIR="${CROWDSEC_LIB_DIR}/plugins" +CROWDSEC_PLUGIN_DIR="${CROWDSEC_USR_DIR}/plugins" CROWDSEC_PLUGIN_BACKEND_DIR="${CROWDSEC_PLUGIN_DIR}/backend" CROWDSEC_DB_PATH="${CROWDSEC_DATA_DIR}/crowdsec.db" -CROWDSEC_CONFIG_PATH="/etc/crowdsec" -CROWDSEC_CONFIG_PATH="${CROWDSEC_CONFIG_PATH}/config" +CROWDSEC_PATH="/etc/crowdsec" +CROWDSEC_CONFIG_PATH="${CROWDSEC_PATH}/config" CROWDSEC_LOG_FILE="/var/log/crowdsec.log" CROWDSEC_BACKEND_FOLDER="/etc/crowdsec/plugins/backend" CSCLI_FOLDER="/etc/crowdsec/config/cscli" @@ -39,7 +40,7 @@ setup_cron_pull() { } -PID_DIR="/var/run" +PID_DIR="${CROWDSEC_RUN_DIR}" SYSTEMD_PATH_FILE="/etc/systemd/system/crowdsec.service" PATTERNS_FOLDER="config/patterns" @@ -340,10 +341,11 @@ uninstall_crowdsec() { systemctl stop crowdsec.service ${CSCLI_BIN} dashboard stop --remove delete_bins - rm -rf ${CROWDSEC_CONFIG_PATH} || echo "" + rm -rf ${CROWDSEC_PATH} || echo "" rm -f ${CROWDSEC_LOG_FILE} || echo "" rm -f ${CROWDSEC_DB_PATH} || echo "" rm -rf ${CROWDSEC_LIB_DIR} || echo "" + rm -rf ${CROWDSEC_USR_DIR} || echo "" rm -f ${SYSTEMD_PATH_FILE} || echo "" log_info "crowdsec successfully uninstalled" }