Portability: sysfs-only sensors with thermal-zone fallback, /sys/block disk discovery, fs blacklist, pwrstat/NUT/apcupsd UPS, login shell from passwd, templated unit + install for any user, cross-compile targets

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
Mitchell-Johnson
2026-09-17 13:43:44 -07:00
co-authored by Claude Fable 5.1
parent 3c6f4d4639
commit 7053cce7fe
9 changed files with 432 additions and 102 deletions
+5 -1
View File
@@ -10,6 +10,7 @@ import (
"log"
"net/http"
"os"
"os/user"
"strings"
"time"
@@ -41,8 +42,11 @@ func New(cfg *config.Config, sessions *auth.Sessions, mgr *term.Manager, col *me
host, _ := os.Hostname()
s := &Server{cfg: cfg, sessions: sessions, mgr: mgr, metrics: col, ui: ui, version: version,
started: time.Now(), host: host, user: os.Getenv("USER")}
if u, err := user.Current(); err == nil && u.Username != "" {
s.user = u.Username
}
if s.user == "" {
s.user = "core"
s.user = "?"
}
m := http.NewServeMux()
m.HandleFunc("GET /healthz", func(w http.ResponseWriter, _ *http.Request) { w.WriteHeader(204) })