docker: allow GID with no persistent sqlite db (#2381)
This commit is contained in:
parent
9dfc66ef04
commit
643445b7cf
1 changed files with 4 additions and 2 deletions
|
@ -273,8 +273,10 @@ fi
|
|||
# crowdsec sqlite database permissions
|
||||
if [ "$GID" != "" ]; then
|
||||
if istrue "$(conf_get '.db_config.type == "sqlite"')"; then
|
||||
chown ":$GID" "$(conf_get '.db_config.db_path')"
|
||||
echo "sqlite database permissions updated"
|
||||
# don't fail if the db is not there yet
|
||||
chown -f ":$GID" "$(conf_get '.db_config.db_path')" 2>/dev/null \
|
||||
&& echo "sqlite database permissions updated" \
|
||||
|| true
|
||||
fi
|
||||
fi
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue