diff --git a/internal/home/service.go b/internal/home/service.go index c3551143..8087d097 100644 --- a/internal/home/service.go +++ b/internal/home/service.go @@ -104,7 +104,7 @@ func sendSigReload() { return } - pid, err := strconv.Atoi(parts[0]) + pid, err := strconv.Atoi(strings.TrimSpace(parts[0])) if err != nil { log.Error("Can't read PID file %s: %s", pidfile, err) return diff --git a/internal/home/tls.go b/internal/home/tls.go index d9ab356a..a6a90aaf 100644 --- a/internal/home/tls.go +++ b/internal/home/tls.go @@ -136,6 +136,10 @@ func (t *TLSMod) Reload() { t.certLastMod = fi.ModTime().UTC() _ = reconfigureDNSServer() + + t.confLock.Lock() + tlsConf = t.conf + t.confLock.Unlock() Context.web.TLSConfigChanged(tlsConf) }