diff options
Diffstat (limited to 'routes/install.go')
-rw-r--r-- | routes/install.go | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/routes/install.go b/routes/install.go index 948c67c2..2c50f1b3 100644 --- a/routes/install.go +++ b/routes/install.go @@ -84,11 +84,21 @@ func GlobalInit() { } checkRunMode() - if setting.InstallLock && setting.SSH.StartBuiltinServer { + if !setting.InstallLock { + return + } + + if setting.SSH.StartBuiltinServer { ssh.Listen(setting.SSH.ListenHost, setting.SSH.ListenPort, setting.SSH.ServerCiphers) log.Info("SSH server started on %s:%v", setting.SSH.ListenHost, setting.SSH.ListenPort) log.Trace("SSH server cipher list: %v", setting.SSH.ServerCiphers) } + + if setting.SSH.RewriteAuthorizedKeysAtStrat { + if err := models.RewriteAuthorizedKeys(); err != nil { + log.Warn("Fail to rewrite authorized_keys file: %v", err) + } + } } func InstallInit(c *context.Context) { |