summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorClint Armstrong <github@clintarmstrong.net>2015-01-17 16:52:42 -0500
committerClint Armstrong <github@clintarmstrong.net>2015-01-17 16:52:42 -0500
commiteae08ea8f4823ebc26ae0833f2c251a21402459d (patch)
tree77e04bbca1636b1ad743858846355fb055366fa2 /scripts
parentbb26285a12f90a4331053169bf580cc766bc6add (diff)
downloadgitea-eae08ea8f4823ebc26ae0833f2c251a21402459d.tar.gz
gitea-eae08ea8f4823ebc26ae0833f2c251a21402459d.zip
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.
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/start.sh2
1 files changed, 1 insertions, 1 deletions
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