diff options
author | James Moger <james.moger@gitblit.com> | 2014-09-30 08:07:59 -0400 |
---|---|---|
committer | James Moger <james.moger@gitblit.com> | 2014-09-30 08:07:59 -0400 |
commit | 794034351714877b71838aec5c51dc015b55d848 (patch) | |
tree | 3b8c437bec1b1b3b2569fadfc1183c3fc2b4930c /src/main/java/com/gitblit/GitBlitServer.java | |
parent | afbcba32133f1c85ef50a6515fabad2aa745b614 (diff) | |
parent | 43ddbf959829a732f5aefcccf72d2812a41fdbfd (diff) | |
download | gitblit-794034351714877b71838aec5c51dc015b55d848.tar.gz gitblit-794034351714877b71838aec5c51dc015b55d848.zip |
Merge branch 'ticket/193' into develop
Diffstat (limited to 'src/main/java/com/gitblit/GitBlitServer.java')
-rw-r--r-- | src/main/java/com/gitblit/GitBlitServer.java | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/main/java/com/gitblit/GitBlitServer.java b/src/main/java/com/gitblit/GitBlitServer.java index cd269806..a1fd071f 100644 --- a/src/main/java/com/gitblit/GitBlitServer.java +++ b/src/main/java/com/gitblit/GitBlitServer.java @@ -148,6 +148,15 @@ public class GitBlitServer { System.exit(0); } + protected File getBaseFolder(Params params) { + String path = System.getProperty("GITBLIT_HOME", Params.baseFolder); + if (!StringUtils.isEmpty(System.getenv("GITBLIT_HOME"))) { + path = System.getenv("GITBLIT_HOME"); + } + + return new File(path).getAbsoluteFile(); + } + /** * Stop Gitblt GO. */ @@ -170,7 +179,7 @@ public class GitBlitServer { * Start Gitblit GO. */ protected final void start(Params params) { - final File baseFolder = new File(Params.baseFolder).getAbsoluteFile(); + final File baseFolder = getBaseFolder(params); FileSettings settings = params.FILESETTINGS; if (!StringUtils.isEmpty(params.settingsfile)) { if (new File(params.settingsfile).exists()) { |