diff options
author | James Moger <james.moger@gitblit.com> | 2014-03-19 09:04:50 -0400 |
---|---|---|
committer | James Moger <james.moger@gitblit.com> | 2014-04-10 18:58:09 -0400 |
commit | 8b87994373f018fe8a7b092831ad6f6bdca1ad6e (patch) | |
tree | a95dbda849e77ac4c6d2bebe3e0eb6f0d0776214 /src/main/java/com/gitblit/manager | |
parent | 13331ae61c7f08b4a202a531e005915147467bd8 (diff) | |
download | gitblit-8b87994373f018fe8a7b092831ad6f6bdca1ad6e.tar.gz gitblit-8b87994373f018fe8a7b092831ad6f6bdca1ad6e.zip |
Improve isServingRepositories check
Diffstat (limited to 'src/main/java/com/gitblit/manager')
-rw-r--r-- | src/main/java/com/gitblit/manager/RuntimeManager.java | 4 | ||||
-rw-r--r-- | src/main/java/com/gitblit/manager/ServicesManager.java | 6 |
2 files changed, 9 insertions, 1 deletions
diff --git a/src/main/java/com/gitblit/manager/RuntimeManager.java b/src/main/java/com/gitblit/manager/RuntimeManager.java index 45d1ea12..9805701b 100644 --- a/src/main/java/com/gitblit/manager/RuntimeManager.java +++ b/src/main/java/com/gitblit/manager/RuntimeManager.java @@ -116,7 +116,9 @@ public class RuntimeManager implements IRuntimeManager { */ @Override public boolean isServingRepositories() { - return settings.getBoolean(Keys.git.enableGitServlet, true) || (settings.getInteger(Keys.git.daemonPort, 0) > 0); + return settings.getBoolean(Keys.git.enableGitServlet, true) + || (settings.getInteger(Keys.git.daemonPort, 0) > 0) + || (settings.getInteger(Keys.git.sshPort, 0) > 0); } /** diff --git a/src/main/java/com/gitblit/manager/ServicesManager.java b/src/main/java/com/gitblit/manager/ServicesManager.java index 93121cfb..e0fc8bbd 100644 --- a/src/main/java/com/gitblit/manager/ServicesManager.java +++ b/src/main/java/com/gitblit/manager/ServicesManager.java @@ -102,6 +102,12 @@ public class ServicesManager implements IManager { return this; } + public boolean isServingRepositories() { + return settings.getBoolean(Keys.git.enableGitServlet, true) + || (gitDaemon != null && gitDaemon.isRunning()) + || (sshDaemon != null && sshDaemon.isRunning()); + } + protected void configureFederation() { boolean validPassphrase = true; String passphrase = settings.getString(Keys.federation.passphrase, ""); |