Warn when server starts with TLS enabled but no key available

Signed-off-by: Jonathon Anderson <janderson@ciq.com>
This commit is contained in:
Jonathon Anderson
2026-02-17 14:00:32 -07:00
parent 673d7627b5
commit dc21302f32

View File

@@ -94,6 +94,7 @@ func RunServer() error {
if !util.IsFile(key) || !util.IsFile(crt) { if !util.IsFile(key) || !util.IsFile(crt) {
wwlog.Error("TLS enabled but keys not found in %s", path.Join(conf.Paths.Sysconfdir, "warewulf", "tls")) wwlog.Error("TLS enabled but keys not found in %s", path.Join(conf.Paths.Sysconfdir, "warewulf", "tls"))
wwlog.Error("Runtime overlays will NOT be served. Run 'wwctl configure tls --create' to generate keys.")
} else { } else {
httpsHandler := configureHandler(true, apiHandler) httpsHandler := configureHandler(true, apiHandler)
go func() { go func() {