From: Clint Armstrong Date: Sat, 17 Jan 2015 21:52:42 +0000 (-0500) Subject: Allow start.sh from any working directory X-Git-Tag: v0.9.99~1538^2^2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=eae08ea8f4823ebc26ae0833f2c251a21402459d;p=gitea.git Allow start.sh from any working directory This change to start.sh allows it to be executed from any working directory and always reference the gogs binary in the parent directory. Very helpful when calling start.sh from an init script. --- diff --git a/scripts/start.sh b/scripts/start.sh index 85de4556ff..997b5fc272 100755 --- a/scripts/start.sh +++ b/scripts/start.sh @@ -12,4 +12,4 @@ USER=$(whoami) HOME=$(grep "^$USER:" /etc/passwd | cut -d: -f6) export USER HOME PATH -cd "$(pwd)" && exec ./gogs web +cd "$(dirname "$0")/.." && exec ./gogs web