start.sh 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. #!/bin/bash -
  2. #
  3. if ! test -d /data/gogs
  4. then
  5. mkdir -p /var/run/sshd
  6. mkdir -p /data/gogs/data /data/gogs/conf /data/gogs/log /data/git
  7. fi
  8. if ! test -d /data/ssh
  9. then
  10. mkdir /data/ssh
  11. ssh-keygen -q -f /data/ssh/ssh_host_key -N '' -t rsa1
  12. ssh-keygen -q -f /data/ssh/ssh_host_rsa_key -N '' -t rsa
  13. ssh-keygen -q -f /data/ssh/ssh_host_dsa_key -N '' -t dsa
  14. ssh-keygen -q -f /data/ssh/ssh_host_ecdsa_key -N '' -t ecdsa
  15. ssh-keygen -q -f /data/ssh/ssh_host_ed25519_key -N '' -t ed25519
  16. chown -R root:root /data/ssh/*
  17. chmod 600 /data/ssh/*
  18. fi
  19. service ssh start
  20. # sync templates
  21. test -d /data/gogs/templates || cp -ar ./templates /data/gogs/
  22. rsync -rtv /data/gogs/templates/ ./templates/
  23. ln -sf /data/gogs/log ./log
  24. ln -sf /data/gogs/data ./data
  25. ln -sf /data/git /home/git
  26. if ! test -d ~git/.ssh
  27. then
  28. mkdir ~git/.ssh
  29. chmod 700 ~git/.ssh
  30. fi
  31. if ! test -f ~git/.ssh/environment
  32. then
  33. echo "GOGS_CUSTOM=/data/gogs" > ~git/.ssh/environment
  34. chown git:git ~git/.ssh/environment
  35. chown 600 ~git/.ssh/environment
  36. fi
  37. chown -R git:git /data .
  38. exec su git -c "./gogs web"
PANIC: session(release): write data/sessions/0/c/0c8c13e62a816ede: no space left on device

PANIC

session(release): write data/sessions/0/c/0c8c13e62a816ede: no space left on device
github.com/go-macaron/session@v0.0.0-20190805070824-1a3cdc6f5659/session.go:199 (0x8b2934)
gopkg.in/macaron.v1@v1.3.9/context.go:79 (0x83d0a0)
github.com/go-macaron/inject@v0.0.0-20160627170012-d8a0b8677191/inject.go:157 (0x80ab07)
github.com/go-macaron/inject@v0.0.0-20160627170012-d8a0b8677191/inject.go:135 (0x80a8a8)
gopkg.in/macaron.v1@v1.3.9/context.go:121 (0x83d1f8)
gopkg.in/macaron.v1@v1.3.9/context.go:112 (0x84fdb5)
gopkg.in/macaron.v1@v1.3.9/recovery.go:161 (0x84fda8)
gopkg.in/macaron.v1@v1.3.9/logger.go:40 (0x840c73)
github.com/go-macaron/inject@v0.0.0-20160627170012-d8a0b8677191/inject.go:157 (0x80ab07)
github.com/go-macaron/inject@v0.0.0-20160627170012-d8a0b8677191/inject.go:135 (0x80a8a8)
gopkg.in/macaron.v1@v1.3.9/context.go:121 (0x83d1f8)
gopkg.in/macaron.v1@v1.3.9/router.go:187 (0x850fc6)
gopkg.in/macaron.v1@v1.3.9/router.go:303 (0x8493e5)
gopkg.in/macaron.v1@v1.3.9/macaron.go:220 (0x841fca)
net/http/server.go:2836 (0x7a79b2)
net/http/server.go:1924 (0x7a341b)
runtime/asm_amd64.s:1373 (0x46f9f0)