diff options
| -rw-r--r-- | grilist/config.go | 1 | ||||
| -rw-r--r-- | main.go | 12 |
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 | ||
| 22 | func (c *Config) DBConnectionString() string { | 23 | func (c *Config) DBConnectionString() string { |
| @@ -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") |
