mirror of
https://github.com/crowdsecurity/crowdsec.git
synced 2025-05-10 20:05:55 +02:00
parent
9d2cd58f31
commit
db5ffb0040
3 changed files with 31 additions and 7 deletions
|
@ -39,6 +39,9 @@ PARSER_S02="$PARSER_DIR/s02-enrich"
|
|||
SCENARIOS_DIR="$CONFIG_DIR/scenarios"
|
||||
POSTOVERFLOWS_DIR="$CONFIG_DIR/postoverflows"
|
||||
HUB_DIR="$CONFIG_DIR/hub"
|
||||
PLUGINS="http slack splunk"
|
||||
PLUGINS_DIR="plugins"
|
||||
NOTIF_DIR="notifications"
|
||||
|
||||
log_info() {
|
||||
msg=$1
|
||||
|
@ -59,11 +62,12 @@ create_arbo() {
|
|||
mkdir -p "$POSTOVERFLOWS_DIR"
|
||||
mkdir -p "$CSCLI_DIR"
|
||||
mkdir -p "$HUB_DIR"
|
||||
mkdir -p $CONFIG_DIR/$NOTIF_DIR/$plugin
|
||||
mkdir -p $BASE/$PLUGINS_DIR
|
||||
}
|
||||
|
||||
copy_files() {
|
||||
cp "./config/profiles.yaml" "$CONFIG_DIR"
|
||||
cp "./config/dev.yaml" "$BASE"
|
||||
cp "./config/simulation.yaml" "$CONFIG_DIR"
|
||||
cp "./cmd/crowdsec/crowdsec" "$BASE"
|
||||
cp "./cmd/crowdsec-cli/cscli" "$BASE"
|
||||
|
@ -71,6 +75,12 @@ copy_files() {
|
|||
cp "./config/acquis.yaml" "$CONFIG_DIR"
|
||||
touch "$CONFIG_DIR"/local_api_credentials.yaml
|
||||
touch "$CONFIG_DIR"/online_api_credentials.yaml
|
||||
envsubst < "./config/dev.yaml" > $BASE/dev.yaml
|
||||
for plugin in $PLUGINS
|
||||
do
|
||||
cp $PLUGINS_DIR/$NOTIF_DIR/$plugin/notification-$plugin $BASE/$PLUGINS_DIR/notification-$plugin
|
||||
cp $PLUGINS_DIR/$NOTIF_DIR/$plugin/$plugin.yaml $CONFIG_DIR/$NOTIF_DIR/$plugin.yaml
|
||||
done
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue