Don't use init function to load status DB

This commit is contained in:
Gregory Kurtzer
2022-01-15 02:27:45 +00:00
parent 3f68bc86db
commit be41b79261
2 changed files with 5 additions and 5 deletions

View File

@@ -41,6 +41,11 @@ func RunServer() error {
fmt.Printf("ERROR: Could not load database: %s\n", err)
}
err = LoadNodeStatus()
if err != nil {
wwlog.Printf(wwlog.ERROR, "Could not prepopulate node status DB: %s\n", err)
}
http.HandleFunc("/ipxe/", IpxeSend)
http.HandleFunc("/kernel/", KernelSend)
http.HandleFunc("/kmods/", KmodsSend)