filebrowser/docker/root/etc/cont-init.d/20-config
Lanjelin 867243970b
Update 20-config
Fix permission error, and missing filebrowser.db for .s6 images.
Should resolve https://github.com/filebrowser/filebrowser/issues/2217
2023-12-11 09:23:04 +01:00

18 lines
318 B
Plaintext

#!/usr/bin/with-contenv bash
# 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 -R "$PUID:$PGID" \
/config \
/database \
/srv