aboutsummaryrefslogtreecommitdiffstats
path: root/cmd/serve.go
diff options
context:
space:
mode:
authorUnknwon <u@gogs.io>2016-02-21 21:55:59 -0500
committerUnknwon <u@gogs.io>2016-02-21 21:55:59 -0500
commitc9516c4c60684d20c45e4c0c15911603dc9f20b3 (patch)
treee4afda4bf16392593a07ab8dcbc9ad71f32069a6 /cmd/serve.go
parent6e74dd4388dc41164e11491b38444cf6aa97f758 (diff)
downloadgitea-c9516c4c60684d20c45e4c0c15911603dc9f20b3.tar.gz
gitea-c9516c4c60684d20c45e4c0c15911603dc9f20b3.zip
Fix wrong place to check disable SSH
Diffstat (limited to 'cmd/serve.go')
-rw-r--r--cmd/serve.go11
1 files changed, 6 insertions, 5 deletions
diff --git a/cmd/serve.go b/cmd/serve.go
index cca00b75cf..abfa46a241 100644
--- a/cmd/serve.go
+++ b/cmd/serve.go
@@ -42,11 +42,6 @@ func setup(logPath string) {
setting.NewContext()
log.NewGitLogger(filepath.Join(setting.LogRootPath, logPath))
- if setting.DisableSSH {
- println("Gogs: SSH has been disabled")
- os.Exit(1)
- }
-
models.LoadConfigs()
if setting.UseSQLite3 || setting.UseTiDB {
@@ -138,8 +133,14 @@ func runServ(c *cli.Context) {
if c.IsSet("config") {
setting.CustomConf = c.String("config")
}
+
setup("serv.log")
+ if setting.DisableSSH {
+ println("Gogs: SSH has been disabled")
+ return
+ }
+
if len(c.Args()) < 1 {
fail("Not enough arguments", "Not enough arguments")
}