Load config on page load
This commit is contained in:
parent
3bb3c91907
commit
1c7776be3b
1 changed files with 7 additions and 0 deletions
7
main.go
7
main.go
|
@ -32,6 +32,13 @@ func rootPage(w http.ResponseWriter, r *http.Request) {
|
|||
return
|
||||
}
|
||||
|
||||
config_new, err := core.LoadConfig()
|
||||
if err != nil {
|
||||
log.Println("[WARN] failed to load config:", err)
|
||||
} else {
|
||||
config = config_new
|
||||
}
|
||||
|
||||
// get service status'
|
||||
var data []scanner.ServiceStatus
|
||||
for _, v := range config.Service {
|
||||
|
|
Loading…
Reference in a new issue