Skip to content

Commit

Permalink
docker: make sure the sqlite db is present before changing GID (#3140)
Browse files Browse the repository at this point in the history
  • Loading branch information
mmetc authored Jul 18, 2024
1 parent 443ec37 commit 8f1abc3
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions docker/docker_start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -333,6 +333,8 @@ fi
# crowdsec sqlite database permissions
if [ "$GID" != "" ]; then
if istrue "$(conf_get '.db_config.type == "sqlite"')"; then
# force the creation of the db file(s)
cscli machines inspect create-db --error >/dev/null 2>&1 || :
# don't fail if the db is not there yet
if chown -f ":$GID" "$(conf_get '.db_config.db_path')" 2>/dev/null; then
echo "sqlite database permissions updated"
Expand Down

0 comments on commit 8f1abc3

Please sign in to comment.