From eae08ea8f4823ebc26ae0833f2c251a21402459d Mon Sep 17 00:00:00 2001 From: Clint Armstrong Date: Sat, 17 Jan 2015 16:52:42 -0500 Subject: [PATCH] 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. --- scripts/start.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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