From 7aaf955a8455c6cedd74d7a8e3cda6de8318a0c2 Mon Sep 17 00:00:00 2001 From: jan Date: Thu, 13 Oct 2016 17:00:48 +0200 Subject: enable_nsa zur config hinzugefuegt diff --git a/grilist/config.go b/grilist/config.go index 8798338..c69c873 100644 --- a/grilist/config.go +++ b/grilist/config.go @@ -17,6 +17,7 @@ type Config struct { Password string `toml:"password"` SSLEnabled bool `toml:ssl_enabled"` } `toml:"database"` + EnableNSA bool `toml:"enable_nsa"` } func (c *Config) DBConnectionString() string { diff --git a/main.go b/main.go index 75eee68..ad3dd84 100644 --- a/main.go +++ b/main.go @@ -54,11 +54,13 @@ func main() { log.Println("database connection established") - if err := nsa.Init(db); err != nil { - panic(err) - } - if err := nsa.SetEvents(eventlogging.Events); err != nil { - panic(err) + if config.EnableNSA { + if err := nsa.Init(db); err != nil { + panic(err) + } + if err := nsa.SetEvents(eventlogging.Events); err != nil { + panic(err) + } } renderer := frontend.New("views") -- cgit v0.10.1