mirror of
https://github.com/yusing/godoxy.git
synced 2026-03-27 19:41:11 +01:00
fix negative waitgroup, fix cert expiry date, better auto renewal strategy
This commit is contained in:
@@ -11,7 +11,6 @@ import (
|
||||
)
|
||||
|
||||
func main() {
|
||||
// flag.Parse()
|
||||
runtime.GOMAXPROCS(runtime.NumCPU())
|
||||
|
||||
logrus.SetFormatter(&logrus.TextFormatter{
|
||||
@@ -52,7 +51,10 @@ func main() {
|
||||
aclog.Fatal("error obtaining certificate ", err)
|
||||
}
|
||||
}
|
||||
aclog.Infof("certificate will be expired at %v and get renewed", autoCertProvider.GetExpiry())
|
||||
for name, expiry := range autoCertProvider.GetExpiries() {
|
||||
aclog.Infof("certificate %q: expire on %v", name, expiry)
|
||||
}
|
||||
go autoCertProvider.ScheduleRenewal()
|
||||
}
|
||||
proxyServer = NewServer(
|
||||
"proxy",
|
||||
@@ -86,9 +88,8 @@ func main() {
|
||||
signal.Notify(sig, syscall.SIGHUP)
|
||||
|
||||
<-sig
|
||||
cfg.StopWatching()
|
||||
StopFSWatcher()
|
||||
StopDockerWatcher()
|
||||
// cfg.StopWatching()
|
||||
|
||||
cfg.StopProviders()
|
||||
panelServer.Stop()
|
||||
proxyServer.Stop()
|
||||
|
||||
Reference in New Issue
Block a user