setup 614 B

1234567891011121314151617181920212223242526
  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 "GITOTE_CUSTOM=${GITOTE_CUSTOM}" > ~git/.ssh/environment
  8. chmod 600 ~git/.ssh/environment
  9. fi
  10. cd /app/gitote
  11. # Link volumed data with app data
  12. ln -sfn /data/gitote/log ./log
  13. ln -sfn /data/gitote/data ./data
  14. ln -sfn /data/git /home/git
  15. # Only chown for the first time, '/data/gitote/conf/app.ini' must exist inside Docker after installation
  16. if ! test -d /data/gitote/conf/app.ini; then
  17. chown -R git:git /data /app/gitote ~git/
  18. fi
  19. chmod 0755 /data /data/gitote ~git/