| 123456789101112131415161718192021222324252627282930313233 | #!/bin/shif ! test -d ~git/.ssh; then    mkdir -p ~git/.ssh    chmod 700 ~git/.sshfiif ! test -f ~git/.ssh/environment; then    echo "GOGS_CUSTOM=${GOGS_CUSTOM}" > ~git/.ssh/environment    chmod 600 ~git/.ssh/environmentficd /app/gogs# Link volumed data with app dataln -sfn /data/gogs/log  ./logln -sfn /data/gogs/data ./data# Backward Compatibility with Gogs Container v0.6.15ln -sfn /data/git /home/git# Only chown for the first time, owner of '/data' is 'git' inside Docker after installationif [ $(stat -c '%U' /data) != 'git' ]; then    chown -R git:git /data ~git/fi# Check ownership of '/app/gogs' in case the image changed and '/data' is persistentif [ $(stat -c '%U' /app/gogs) != 'git' ]; then    chown -R git:git /app/gogsfichmod 0755 /data /data/gogs ~git/
 |