Changes to config file loading

This commit is contained in:
Torkel Ödegaard
2015-01-01 15:29:10 +01:00
parent ad4cf373a6
commit 29c9330965
6 changed files with 161 additions and 41 deletions
+9 -3
View File
@@ -25,7 +25,13 @@ var CmdWeb = cli.Command{
Usage: "grafana web",
Description: "Starts Grafana backend & web server",
Action: runWeb,
Flags: []cli.Flag{},
Flags: []cli.Flag{
cli.StringFlag{
Name: "config",
Value: "grafana.ini",
Usage: "path to config file",
},
},
}
func newMacaron() *macaron.Macaron {
@@ -61,8 +67,8 @@ func mapStatic(m *macaron.Macaron, dir string, prefix string) {
))
}
func runWeb(*cli.Context) {
log.Info("Starting Grafana-Pro v.2-alpha")
func runWeb(c *cli.Context) {
log.Info("Starting Grafana 2.0-alpha")
setting.NewConfigContext()
setting.InitServices()