Skip to content

Commit

Permalink
Merge pull request #44 from crowdsecurity/fix_paths
Browse files Browse the repository at this point in the history
Fix paths
  • Loading branch information
buixor committed May 27, 2020
2 parents b4258b3 + 1fc83ca commit 6aee9c0
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 8 deletions.
2 changes: 1 addition & 1 deletion config/plugins/backend/sqlite.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: sqlite
path: /var/lib/crowdsec/plugins/backend/sqlite.so
path: /usr/local/lib/crowdsec/plugins/backend/sqlite.so
config:
db_path: /var/lib/crowdsec/data/crowdsec.db
flush: true
1 change: 1 addition & 0 deletions docs/getting_started/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 :
Expand Down
2 changes: 1 addition & 1 deletion docs/references/output.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ config: <plugin_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/lib/crowdsec/plugins/backend/sqlite.so
config:
db_path: /var/lib/crowdsec/data/crowdsec.db
flush: true
Expand Down
2 changes: 1 addition & 1 deletion mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
12 changes: 7 additions & 5 deletions wizard.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,13 @@ SILENT="false"

CROWDSEC_RUN_DIR="/var/run"
CROWDSEC_LIB_DIR="/var/lib/crowdsec"
CROWDSEC_USR_DIR="/usr/local/lib/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"
Expand All @@ -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"
Expand Down Expand Up @@ -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"
}
Expand Down

0 comments on commit 6aee9c0

Please sign in to comment.