소스 검색

only chown directories during docker setup if necessary. Fix #4425 (#5064)

Signed-off-by: Fabian Braun <fabian-braun@mailbox.org>
tags/v1.7.0-dev
Fabian Braun 5 년 전
부모
커밋
d0f614a25b
1개의 변경된 파일4개의 추가작업 그리고 1개의 파일을 삭제
  1. 4
    1
      docker/etc/s6/gitea/setup

+ 4
- 1
docker/etc/s6/gitea/setup 파일 보기

@@ -39,5 +39,8 @@ if [ ! -f /data/gitea/conf/app.ini ]; then
envsubst < /etc/templates/app.ini > /data/gitea/conf/app.ini
fi

chown -R ${USER}:git /data/gitea /app/gitea /data/git
# only chown if current owner is not already the gitea ${USER}. No recursive check to save time
if ! [[ $(ls -ld /data/gitea | awk '{print $3}') = ${USER} ]]; then chown -R ${USER}:git /data/gitea; fi
if ! [[ $(ls -ld /app/gitea | awk '{print $3}') = ${USER} ]]; then chown -R ${USER}:git /app/gitea; fi
if ! [[ $(ls -ld /data/git | awk '{print $3}') = ${USER} ]]; then chown -R ${USER}:git /data/git; fi
chmod 0755 /data/gitea /app/gitea /data/git

Loading…
취소
저장