aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--grilist/config.go1
-rw-r--r--main.go12
2 files changed, 8 insertions, 5 deletions
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 {
17 Password string `toml:"password"` 17 Password string `toml:"password"`
18 SSLEnabled bool `toml:ssl_enabled"` 18 SSLEnabled bool `toml:ssl_enabled"`
19 } `toml:"database"` 19 } `toml:"database"`
20 EnableNSA bool `toml:"enable_nsa"`
20} 21}
21 22
22func (c *Config) DBConnectionString() string { 23func (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() {
54 54
55 log.Println("database connection established") 55 log.Println("database connection established")
56 56
57 if err := nsa.Init(db); err != nil { 57 if config.EnableNSA {
58 panic(err) 58 if err := nsa.Init(db); err != nil {
59 } 59 panic(err)
60 if err := nsa.SetEvents(eventlogging.Events); err != nil { 60 }
61 panic(err) 61 if err := nsa.SetEvents(eventlogging.Events); err != nil {
62 panic(err)
63 }
62 } 64 }
63 65
64 renderer := frontend.New("views") 66 renderer := frontend.New("views")