start.sh 405 B

12345678910111213141516
  1. #!/bin/sh -
  2. # Copyright 2014 The Gogs Authors. All rights reserved.
  3. # Use of this source code is governed by a MIT-style
  4. # license that can be found in the LICENSE file.
  5. #
  6. # MUST EXECUTE THIS AT ROOT DIRECTORY: ./scripts/start.sh
  7. #
  8. IFS='
  9. '
  10. PATH=/bin:/usr/bin:/usr/local/bin
  11. USER=$(whoami)
  12. HOME=$(grep "^$USER:" /etc/passwd | cut -d: -f6)
  13. export USER HOME PATH
  14. cd "$(dirname "$0")/.." && exec ./gogs web