trying to be [FHS](https://en.wikipedia.org/wiki/Filesystem_Hierarchy_Standard) compliant
This commit is contained in:
parent
cda7beddbf
commit
19d6a979c8
|
@ -1,5 +1,5 @@
|
||||||
name: sqlite
|
name: sqlite
|
||||||
path: /var/lib/crowdsec/plugins/backend/sqlite.so
|
path: /usr/local/crowdsec/plugins/backend/sqlite.so
|
||||||
config:
|
config:
|
||||||
db_path: /var/lib/crowdsec/data/crowdsec.db
|
db_path: /var/lib/crowdsec/data/crowdsec.db
|
||||||
flush: true
|
flush: true
|
||||||
|
|
|
@ -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+
|
* [Go](https://golang.org/doc/install) v1.13+
|
||||||
* `git clone {{crowdsec.url}}`
|
* `git clone {{crowdsec.url}}`
|
||||||
|
* [jq](https://stedolan.github.io/jq/download/)
|
||||||
|
|
||||||
|
|
||||||
Go in {{crowdsec.name}} folder and build the binaries :
|
Go in {{crowdsec.name}} folder and build the binaries :
|
||||||
|
|
|
@ -62,7 +62,7 @@ config: <plugin_config> # in a form of key(string)/value(string)
|
||||||
For the plugin sqlite, here is its configuration file:
|
For the plugin sqlite, here is its configuration file:
|
||||||
```yaml
|
```yaml
|
||||||
name: sqlite
|
name: sqlite
|
||||||
path: /var/lib/crowdsec/plugins/backend/sqlite.so
|
path: /usr/local/crowdsec/plugins/backend/sqlite.so
|
||||||
config:
|
config:
|
||||||
db_path: /var/lib/crowdsec/data/crowdsec.db
|
db_path: /var/lib/crowdsec/data/crowdsec.db
|
||||||
flush: true
|
flush: true
|
||||||
|
|
|
@ -129,7 +129,7 @@ extra:
|
||||||
plugins:
|
plugins:
|
||||||
name: blockers
|
name: blockers
|
||||||
url: "https://hub.crowdsec.net/"
|
url: "https://hub.crowdsec.net/"
|
||||||
binpath: "/var/lib/crowdsec/plugins/"
|
binpath: "/usr/local/crowdsec/plugins/"
|
||||||
configpath: "/etc/crowdsec/plugins/"
|
configpath: "/etc/crowdsec/plugins/"
|
||||||
metabase:
|
metabase:
|
||||||
name: metabase
|
name: metabase
|
||||||
|
|
12
wizard.sh
12
wizard.sh
|
@ -14,12 +14,13 @@ SILENT="false"
|
||||||
|
|
||||||
CROWDSEC_RUN_DIR="/var/run"
|
CROWDSEC_RUN_DIR="/var/run"
|
||||||
CROWDSEC_LIB_DIR="/var/lib/crowdsec"
|
CROWDSEC_LIB_DIR="/var/lib/crowdsec"
|
||||||
|
CROWDSEC_USR_DIR="/usr/local/crowdsec"
|
||||||
CROWDSEC_DATA_DIR="${CROWDSEC_LIB_DIR}/data"
|
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_PLUGIN_BACKEND_DIR="${CROWDSEC_PLUGIN_DIR}/backend"
|
||||||
CROWDSEC_DB_PATH="${CROWDSEC_DATA_DIR}/crowdsec.db"
|
CROWDSEC_DB_PATH="${CROWDSEC_DATA_DIR}/crowdsec.db"
|
||||||
CROWDSEC_CONFIG_PATH="/etc/crowdsec"
|
CROWDSEC_PATH="/etc/crowdsec"
|
||||||
CROWDSEC_CONFIG_PATH="${CROWDSEC_CONFIG_PATH}/config"
|
CROWDSEC_CONFIG_PATH="${CROWDSEC_PATH}/config"
|
||||||
CROWDSEC_LOG_FILE="/var/log/crowdsec.log"
|
CROWDSEC_LOG_FILE="/var/log/crowdsec.log"
|
||||||
CROWDSEC_BACKEND_FOLDER="/etc/crowdsec/plugins/backend"
|
CROWDSEC_BACKEND_FOLDER="/etc/crowdsec/plugins/backend"
|
||||||
CSCLI_FOLDER="/etc/crowdsec/config/cscli"
|
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"
|
SYSTEMD_PATH_FILE="/etc/systemd/system/crowdsec.service"
|
||||||
|
|
||||||
PATTERNS_FOLDER="config/patterns"
|
PATTERNS_FOLDER="config/patterns"
|
||||||
|
@ -340,10 +341,11 @@ uninstall_crowdsec() {
|
||||||
systemctl stop crowdsec.service
|
systemctl stop crowdsec.service
|
||||||
${CSCLI_BIN} dashboard stop --remove
|
${CSCLI_BIN} dashboard stop --remove
|
||||||
delete_bins
|
delete_bins
|
||||||
rm -rf ${CROWDSEC_CONFIG_PATH} || echo ""
|
rm -rf ${CROWDSEC_PATH} || echo ""
|
||||||
rm -f ${CROWDSEC_LOG_FILE} || echo ""
|
rm -f ${CROWDSEC_LOG_FILE} || echo ""
|
||||||
rm -f ${CROWDSEC_DB_PATH} || echo ""
|
rm -f ${CROWDSEC_DB_PATH} || echo ""
|
||||||
rm -rf ${CROWDSEC_LIB_DIR} || echo ""
|
rm -rf ${CROWDSEC_LIB_DIR} || echo ""
|
||||||
|
rm -rf ${CROWDSEC_USR_DIR} || echo ""
|
||||||
rm -f ${SYSTEMD_PATH_FILE} || echo ""
|
rm -f ${SYSTEMD_PATH_FILE} || echo ""
|
||||||
log_info "crowdsec successfully uninstalled"
|
log_info "crowdsec successfully uninstalled"
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue