|
|
|
|
|
|
|
|
}, |
|
|
}, |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
func setup(logPath string) { |
|
|
|
|
|
|
|
|
func setup(logPath string) error { |
|
|
setting.NewContext() |
|
|
setting.NewContext() |
|
|
log.NewGitLogger(filepath.Join(setting.LogRootPath, logPath)) |
|
|
log.NewGitLogger(filepath.Join(setting.LogRootPath, logPath)) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
models.SetEngine() |
|
|
|
|
|
|
|
|
return models.SetEngine() |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
func parseCmd(cmd string) (string, string) { |
|
|
func parseCmd(cmd string) (string, string) { |
|
|
|
|
|
|
|
|
setting.CustomConf = c.String("config") |
|
|
setting.CustomConf = c.String("config") |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
setup("serv.log") |
|
|
|
|
|
|
|
|
if err := setup("serv.log"); err != nil { |
|
|
|
|
|
fail("System init failed", fmt.Sprintf("setup: %v", err)) |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
if setting.SSH.Disabled { |
|
|
if setting.SSH.Disabled { |
|
|
println("Gitea: SSH has been disabled") |
|
|
println("Gitea: SSH has been disabled") |