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
549 B

  1. #!/bin/bash
  2. if ! env | grep -q root; then
  3. echo "
  4. +----------------------------------------+
  5. | You are not running gitea as root. |
  6. | This is required for the snap package. |
  7. | Please re-run as root. |
  8. +----------------------------------------+
  9. "
  10. $SNAP/gitea/gitea --help
  11. exit 1
  12. fi
  13. # Set usernames for gitea
  14. export USERNAME=root
  15. export USER=root
  16. export GITEA_WORK_DIR=$(snapctl get gitea.snap.workdir)
  17. export GITEA_CUSTOM=$(snapctl get gitea.snap.custom)
  18. $SNAP/bin/gconfig save
  19. cd $SNAP/gitea; ./gitea $@