| | |
| | | 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. |
| | | */ |
| | |
| | | * 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()) { |
| | |
| | | e.printStackTrace(); |
| | | } finally { |
| | | try { |
| | | is.close(); |
| | | if (is != null) { |
| | | is.close(); |
| | | } |
| | | } catch (IOException e) { |
| | | e.printStackTrace(); |
| | | } |