diff options
author | 无闻 <u@gogs.io> | 2015-02-08 20:22:02 -0500 |
---|---|---|
committer | 无闻 <u@gogs.io> | 2015-02-08 20:22:02 -0500 |
commit | cd0ee35b3f887cc4ab6ba16cc2d955bfae607678 (patch) | |
tree | bbe4ad9e924700d35833daf4f681a568dad278f5 /cmd/serve.go | |
parent | 3a44143b81aa050f53d5e0e2c87d4a84345cd94e (diff) | |
parent | 1ab09e4f1b27789121dfba9a6c6e4aa0011ab215 (diff) | |
download | gitea-cd0ee35b3f887cc4ab6ba16cc2d955bfae607678.tar.gz gitea-cd0ee35b3f887cc4ab6ba16cc2d955bfae607678.zip |
Merge pull request #905 from phsmit/conf_on_cli
Add option to provide configuration file on command line
Diffstat (limited to 'cmd/serve.go')
-rw-r--r-- | cmd/serve.go | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/cmd/serve.go b/cmd/serve.go index 1f5d944d4f..af18e05c1e 100644 --- a/cmd/serve.go +++ b/cmd/serve.go @@ -27,7 +27,9 @@ var CmdServ = cli.Command{ Usage: "This command should only be called by SSH shell", Description: `Serv provide access auth for repositories`, Action: runServ, - Flags: []cli.Flag{}, + Flags: []cli.Flag{ + cli.StringFlag{"config, c", "custom/conf/app.ini", "Configuration file", ""}, + }, } func setup(logPath string) { @@ -83,6 +85,9 @@ func In(b string, sl map[string]models.AccessType) bool { } func runServ(k *cli.Context) { + if k.IsSet("config") { + setting.CustomConf = k.String("config") + } setup("serv.log") keys := strings.Split(os.Args[2], "-") |