diff --git a/docker-entrypoint.sh b/docker-entrypoint.sh index b5f5863..e604e7c 100755 --- a/docker-entrypoint.sh +++ b/docker-entrypoint.sh @@ -6,6 +6,11 @@ echo "Version: https://github.com/vogler/free-games-claimer/tree/${COMMIT}" [ ! -z $BRANCH ] && [ $BRANCH != "main" ] && echo "Branch: ${BRANCH}" echo "Build: $NOW" +# Ensure writable data dir for fgc when host bind-mount is owned by root. +if [ "$(id -u)" -eq 0 ]; then + chown -R 1000:1000 /fgc/data 2>/dev/null || true +fi + # Remove chromium profile lock. # When running in docker and then killing it, on the next run chromium displayed a dialog to unlock the profile which made the script time out. # Maybe due to changed hostname of container or due to how the docker container kills playwright - didn't check.