httpd: add support for listening over a Unix-domain socket

Fixes #266
This commit is contained in:
Nicola Murino
2020-12-29 19:02:56 +01:00
parent 40e759c983
commit 0966d44c0f
8 changed files with 102 additions and 13 deletions

View File

@@ -143,7 +143,7 @@ func (s *Service) startServices() {
logger.Debug(logSender, "", "SFTP server not started, disabled in config file")
}
if httpdConf.BindPort > 0 {
if httpdConf.ShouldBind() {
go func() {
if err := httpdConf.Initialize(s.ConfigDir); err != nil {
logger.Error(logSender, "", "could not start HTTP server: %v", err)
@@ -182,7 +182,7 @@ func (s *Service) startServices() {
} else {
logger.Debug(logSender, "", "WebDAV server not started, disabled in config file")
}
if telemetryConf.BindPort > 0 {
if telemetryConf.ShouldBind() {
go func() {
if err := telemetryConf.Initialize(s.ConfigDir); err != nil {
logger.Error(logSender, "", "could not start telemetry server: %v", err)