From 520d0d5139e91f522a32869b19bc457dea84dd1e Mon Sep 17 00:00:00 2001 From: Yannis Gerlach <100762533+ygerlach@users.noreply.github.com> Date: Thu, 30 Apr 2026 17:28:14 +0200 Subject: [PATCH] fix slow chown; add quotes --- docker/prod/entrypoint.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docker/prod/entrypoint.sh b/docker/prod/entrypoint.sh index 0cc2e095162..d9697b635cd 100755 --- a/docker/prod/entrypoint.sh +++ b/docker/prod/entrypoint.sh @@ -49,17 +49,17 @@ if [ "$(id -u)" = '0' ]; then echo "-----> Setting PGVERSION=$PGVERSION PGBIN=$PGBIN PGCONF_FILE=$PGCONF_FILE" export PATH="$PGBIN:$PATH" - mkdir -p $APP_DATA_PATH/{files,git,svn} + mkdir -p "$APP_DATA_PATH"/{files,git,svn} # The $APP_DATA_PATH may be hosted on a NAS that creates snapshots (or a btrfs filesystem). In such a case, the .snapshot folder cannot be touched. - find $APP_DATA_PATH | grep -v .snapshot | xargs -n 1 chown $APP_USER:$APP_USER + find "$APP_DATA_PATH" -path '*/.snapshot*' -prune -o -exec chown "$APP_USER:$APP_USER" {} + if [ -d /etc/apache2/sites-enabled ]; then - chown -R $APP_USER:$APP_USER /etc/apache2/sites-enabled + chown -R "$APP_USER:$APP_USER" /etc/apache2/sites-enabled echo "OpenProject currently expects to be reached on the following domain: ${SERVER_NAME:=localhost}, which does not seem to be how your installation is configured." > /var/www/html/index.html echo "If you are an administrator, please ensure you have correctly set the SERVER_NAME variable when launching your container." >> /var/www/html/index.html fi # Clean up any dangling PID file - rm -f $APP_PATH/tmp/pids/* + rm -f "$APP_PATH"/tmp/pids/* # Clean up a dangling PID file of apache if [ -e "$APACHE_PIDFILE" ]; then