summaryrefslogtreecommitdiffstats
path: root/cmd/dump.go
diff options
context:
space:
mode:
authorPeter Smit <peter@smitmail.eu>2015-02-05 12:12:37 +0200
committerPeter Smit <peter@smitmail.eu>2015-02-05 12:17:35 +0200
commit1ab09e4f1b27789121dfba9a6c6e4aa0011ab215 (patch)
tree59ec5e54ed44c41915217522ea37bebf24bd5797 /cmd/dump.go
parent02c5bade0fabc24b9b7c05a74c65965e2e53f687 (diff)
downloadgitea-1ab09e4f1b27789121dfba9a6c6e4aa0011ab215.tar.gz
gitea-1ab09e4f1b27789121dfba9a6c6e4aa0011ab215.zip
Add option to provide configuration file on command line
Diffstat (limited to 'cmd/dump.go')
-rw-r--r--cmd/dump.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/cmd/dump.go b/cmd/dump.go
index 3e1ccdb8a3..57f1113ea3 100644
--- a/cmd/dump.go
+++ b/cmd/dump.go
@@ -26,10 +26,14 @@ It can be used for backup and capture Gogs server image to send to maintainer`,
Action: runDump,
Flags: []cli.Flag{
cli.BoolFlag{"verbose, v", "show process details", ""},
+ cli.StringFlag{"config, c", "custom/conf/app.ini", "Configuration file", ""},
},
}
func runDump(ctx *cli.Context) {
+ if ctx.IsSet("config") {
+ setting.CustomConf = ctx.String("config")
+ }
setting.NewConfigContext()
models.LoadModelsConfig()
models.SetEngine()