mirror of
https://github.com/crowdsecurity/crowdsec.git
synced 2025-05-11 12:25:53 +02:00
fix the perms of SQLite DB for metabase (#647)
This commit is contained in:
parent
5b7ac4a473
commit
6f8b6cdb42
1 changed files with 10 additions and 1 deletions
|
@ -16,6 +16,15 @@ if [ "$DISABLE_ONLINE_API" == "" ] && [ "$CONFIG_FILE" == "" ] ; then
|
|||
fi
|
||||
fi
|
||||
|
||||
# crowdsec sqlite database permissions
|
||||
if [ "$GID" != "" ]; then
|
||||
IS_SQLITE=$(yq eval '.db_config.type == "sqlite"' /etc/crowdsec/config.yaml)
|
||||
DB_PATH=$(yq eval '.db_config.db_path' /etc/crowdsec/config.yaml)
|
||||
if [ "$IS_SQLITE" == "true" ]; then
|
||||
chown :$GID $DB_PATH
|
||||
fi
|
||||
fi
|
||||
|
||||
## Install collections, parsers & scenarios
|
||||
cscli hub update
|
||||
cscli collections upgrade crowdsecurity/linux
|
||||
|
@ -64,4 +73,4 @@ if [ "$LEVEL_INFO" == "true" ] || [ "$LEVEL_INFO" == "TRUE" ]; then
|
|||
ARGS="$ARGS -info"
|
||||
fi
|
||||
|
||||
exec crowdsec $ARGS
|
||||
exec crowdsec $ARGS
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue