You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

23 lines
497 B

  1. #!/bin/sh
  2. if ! test -d ~git/.ssh; then
  3. mkdir -p ~git/.ssh
  4. chmod 700 ~git/.ssh
  5. fi
  6. if ! test -f ~git/.ssh/environment; then
  7. echo "GOGS_CUSTOM=${GOGS_CUSTOM}" > ~git/.ssh/environment
  8. chmod 600 ~git/.ssh/environment
  9. fi
  10. cd /app/gogs
  11. # Link volumed data with app data
  12. ln -sf /data/gogs/log ./log
  13. ln -sf /data/gogs/data ./data
  14. # Backward Compatibility with Gogs Container v0.6.15
  15. ln -sf /data/git /home/git
  16. chown -R git:git /data /app/gogs ~git/
  17. chmod 0755 /data /data/gogs ~git/