Update 20-config

Fix permission error, and missing filebrowser.db for .s6 images.
Should resolve https://github.com/filebrowser/filebrowser/issues/2217
This commit is contained in:
Lanjelin 2023-12-11 09:23:04 +01:00 committed by GitHub
parent cfafefa35a
commit 867243970b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,15 +1,17 @@
#!/usr/bin/with-contenv bash
# make folders
mkdir -p /database
# copy config
if [ ! -f "/config/settings.json" ]; then
cp -a /defaults/settings.json /config/settings.json
fi
# check if db exists
if [ ! -f "/database/filebrowser.db" ]; then
touch "/database/filebrowser.db"
fi
# permissions
chown abc:abc \
/config/settings.json \
chown -R "$PUID:$PGID" \
/config \
/database \
/srv
/srv