diff --git a/cmd.go b/cmd.go index 8fbd66b..3fe7a06 100644 --- a/cmd.go +++ b/cmd.go @@ -129,8 +129,13 @@ var apiCmd = &cobra.Command{ ), ) case true: - //TODO - log.Printf("dbg: certfile='%s' keyfile='%s'", cfg.Server.API.TLS.Certfile, cfg.Server.API.TLS.Keyfile) + if cfg.Server.API.TLS.Certfile == "" { + log.Fatal("TLS enabled for API but no certificate file provided") + } + + if cfg.Server.API.TLS.Keyfile == "" { + log.Fatal("TLS enabled for UI but no private key file provided") + } e.Logger.Fatal( e.StartTLS(