mirror of
https://github.com/gitbucket/gitbucket.git
synced 2025-11-09 15:05:50 +01:00
Fix #331
This commit is contained in:
@@ -55,6 +55,10 @@ trait SystemSettingsControllerBase extends ControllerBase {
|
||||
post("/admin/system", form)(adminOnly { form =>
|
||||
saveSystemSettings(form)
|
||||
|
||||
if(form.ssh && SshServer.isActive && context.settings.sshPort != form.sshPort){
|
||||
SshServer.stop()
|
||||
}
|
||||
|
||||
if(form.ssh && !SshServer.isActive && form.baseUrl.isDefined){
|
||||
SshServer.start(request.getServletContext,
|
||||
form.sshPort.getOrElse(SystemSettingsService.DefaultSshPort),
|
||||
|
||||
@@ -31,6 +31,7 @@ object SshServer {
|
||||
def stop() = {
|
||||
if(active.compareAndSet(true, false)){
|
||||
server.stop(true)
|
||||
logger.info("SSH Server is stopped.")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user