mirror of
https://github.com/opf/openproject.git
synced 2026-06-13 19:20:00 +00:00
fix slow chown; add quotes
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user