diff options
author | Paul Spieker <p.spieker@duenos.de> | 2019-06-16 19:42:56 +0200 |
---|---|---|
committer | 无闻 <u@gogs.io> | 2019-06-16 13:42:56 -0400 |
commit | 044a45db2e00e89a5c5481c6de794c92a9d6cf45 (patch) | |
tree | f3cfe7b077c9827f6234143cc6c95af7323af37f /docker/s6/gogs | |
parent | 0aec2df74fb87d776466a7be751a8ddae51df0f8 (diff) |
docker: prevent Gogs from running a recursive chown on each boot (#5724)
The chown command in the setup file of Gogs is supposed to be executed just once. As soon as the app.ini file exists, this step should be skipped. However, the test was checking if a directory with the name app.ini exists instead of a file. Therefore, the chown command was executed on each boot.
Diffstat (limited to 'docker/s6/gogs')
-rwxr-xr-x | docker/s6/gogs/setup | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/docker/s6/gogs/setup b/docker/s6/gogs/setup index 7354397c..90ccf5e0 100755 --- a/docker/s6/gogs/setup +++ b/docker/s6/gogs/setup @@ -20,7 +20,7 @@ ln -sfn /data/gogs/data ./data ln -sfn /data/git /home/git # Only chown for the first time, '/data/gogs/conf/app.ini' must exist inside Docker after installation -if ! test -d /data/gogs/conf/app.ini; then +if ! test -f /data/gogs/conf/app.ini; then chown -R git:git /data /app/gogs ~git/ fi chmod 0755 /data /data/gogs ~git/ |