diff options
author | Peter Smit <peter@smitmail.eu> | 2015-02-05 12:12:37 +0200 |
---|---|---|
committer | Peter Smit <peter@smitmail.eu> | 2015-02-05 12:17:35 +0200 |
commit | 1ab09e4f1b27789121dfba9a6c6e4aa0011ab215 (patch) | |
tree | 59ec5e54ed44c41915217522ea37bebf24bd5797 /cmd/web.go | |
parent | 02c5bade0fabc24b9b7c05a74c65965e2e53f687 (diff) |
Add option to provide configuration file on command line
Diffstat (limited to 'cmd/web.go')
-rw-r--r-- | cmd/web.go | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -55,6 +55,7 @@ and it takes care of all the other things for you`, Action: runWeb, Flags: []cli.Flag{ cli.StringFlag{"port, p", "3000", "Temporary port number to prevent conflict", ""}, + cli.StringFlag{"config, c", "custom/conf/app.ini", "Configuration file", ""}, }, } @@ -165,6 +166,9 @@ func newMacaron() *macaron.Macaron { } func runWeb(ctx *cli.Context) { + if ctx.IsSet("config") { + setting.CustomConf = ctx.String("config") + } routers.GlobalInit() checkVersion() |