diff --git a/status.go b/status.go index 5c77c25..f66d3d6 100644 --- a/status.go +++ b/status.go @@ -9,6 +9,7 @@ import ( "log" "net/http" "path/filepath" + "runtime" "sort" "strconv" "strings" @@ -175,6 +176,12 @@ func initStatus(services []*service) { http.Error(w, err.Error(), http.StatusInternalServerError) return } + status := "started" + if svc.Stopped() { + status = "stopped" + } + w.Header().Set("X-Gokrazy-Status", status) + w.Header().Set("X-Gokrazy-GOARCH", runtime.GOARCH) io.Copy(w, &buf) })