allow trigger of saving the config

Signed-off-by: Jeff Carr <jcarr@wit.com>
This commit is contained in:
Jeff Carr 2024-10-22 19:51:01 -05:00
parent 525362fcc7
commit a5a972e2f4
2 changed files with 15 additions and 2 deletions

14
http.go
View File

@ -44,9 +44,23 @@ func okHandler(w http.ResponseWriter, r *http.Request) {
}
if tmp == "/favicon.ico" {
// w.Header().Set("Content-Type", "image/svg+xml")
w.Header().Set("Content-Type", "image/png")
writeFile(w, "ipv6.png")
return
}
if tmp == "/goReference.svg" {
w.Header().Set("Content-Type", "image/svg+xml")
writeFile(w, "goReference.svg")
return
}
if tmp == "/writeconfig" {
writeConfigFile()
return
}
if tmp == "/uptime" {
b, s := clusterHealthy()
if b {

View File

@ -30,8 +30,7 @@ func main() {
}
readConfigFile()
// readHypervisorFile("hypervisor")
writeConfigFile()
// writeConfigFile()
// initialize the grid as unstable
me.unstable = time.Now()