summaryrefslogtreecommitdiffstats
path: root/routers/install.go
diff options
context:
space:
mode:
authorUnknwon <joe2010xtmf@163.com>2015-02-13 16:48:23 -0500
committerUnknwon <joe2010xtmf@163.com>2015-02-13 16:48:23 -0500
commita38e4a0b027f7be1f5523dc8e729f6f8300a8095 (patch)
treeeba69a0fec99f6503438b502a09405b0c0541f65 /routers/install.go
parentdef39d191b7764994b6843491a64123ae5a6ffa9 (diff)
downloadgitea-a38e4a0b027f7be1f5523dc8e729f6f8300a8095.tar.gz
gitea-a38e4a0b027f7be1f5523dc8e729f6f8300a8095.zip
routers/install.go: able to keep previous custom settings for 2nd time install
- .gopmfile: update all commits
Diffstat (limited to 'routers/install.go')
-rw-r--r--routers/install.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/routers/install.go b/routers/install.go
index a3583a1a98..a7828e351c 100644
--- a/routers/install.go
+++ b/routers/install.go
@@ -189,6 +189,12 @@ func InstallPost(ctx *middleware.Context, form auth.InstallForm) {
// Save settings.
cfg := ini.Empty()
+ if com.IsFile(setting.CustomConf) {
+ // Keeps custom settings if there is already something.
+ if err := cfg.Append(setting.CustomConf); err != nil {
+ log.Error(4, "Fail to load custom conf '%s': %v", setting.CustomConf, err)
+ }
+ }
cfg.Section("database").Key("DB_TYPE").SetValue(models.DbCfg.Type)
cfg.Section("database").Key("HOST").SetValue(models.DbCfg.Host)
cfg.Section("database").Key("NAME").SetValue(models.DbCfg.Name)