aboutsummaryrefslogtreecommitdiff
path: root/docker/s6/gogs
diff options
context:
space:
mode:
authorAtsushi Midorikawa <atsushi.m@leapsolutions.co.th>2019-08-11 10:05:11 +0700
committerᴊ. ᴄʜᴇɴ <u@gogs.io>2019-08-10 20:05:11 -0700
commit9571a9b53d6c87457370d8c65017e2919b4f5d79 (patch)
tree1553c5efa9265b8152c192ba56829a21ff1b0a55 /docker/s6/gogs
parentf1e0ebfe937213be2af4a3180fae9f43949de00e (diff)
docker: change how to check whether initial or not (#5766)
Diffstat (limited to 'docker/s6/gogs')
-rwxr-xr-xdocker/s6/gogs/setup4
1 files changed, 2 insertions, 2 deletions
diff --git a/docker/s6/gogs/setup b/docker/s6/gogs/setup
index 90ccf5e0..7d4358b3 100755
--- a/docker/s6/gogs/setup
+++ b/docker/s6/gogs/setup
@@ -19,8 +19,8 @@ ln -sfn /data/gogs/data ./data
# Backward Compatibility with Gogs Container v0.6.15
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 -f /data/gogs/conf/app.ini; then
+# Only chown for the first time, owner of '/data' is 'git' inside Docker after installation
+if [ $(stat -c '%U' /data) != 'git' ]; then
chown -R git:git /data /app/gogs ~git/
fi
chmod 0755 /data /data/gogs ~git/