]> source.dussan.org Git - gitea.git/commitdiff
Allow start.sh from any working directory
authorClint Armstrong <github@clintarmstrong.net>
Sat, 17 Jan 2015 21:52:42 +0000 (16:52 -0500)
committerClint Armstrong <github@clintarmstrong.net>
Sat, 17 Jan 2015 21:52:42 +0000 (16:52 -0500)
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

index 85de4556fff547272d8e31fe77207e9854048cfd..997b5fc272419d1e06760289ec4f97768f38e237 100755 (executable)
@@ -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