This commit is contained in:
parent
a59fed4196
commit
6589571fcd
|
|
@ -170,21 +170,15 @@ func (m *Manager) monitorHealthAndRedeploy(ctx context.Context) {
|
|||
func (m *Manager) Run() (err error) {
|
||||
|
||||
if err = licensecheck.Validate("/etc/license.dat"); err != nil {
|
||||
log.Errorf("License invalid/expired: %v — blocking for 1h", err)
|
||||
|
||||
start := time.Now()
|
||||
for time.Since(start) < time.Hour {
|
||||
log.Errorf("License invalid/expired: %v", err)
|
||||
time.Sleep(30 * time.Second)
|
||||
}
|
||||
log.Warn("1-hour grace period over; continuing startup…")
|
||||
log.Errorf("License invalid/expired: %v — exiting immediately", err)
|
||||
os.Exit(1)
|
||||
} else {
|
||||
log.Infof("License check passed")
|
||||
}
|
||||
|
||||
// ✅ 自动启动 IP 变化监控和部署逻辑
|
||||
ctx := context.Background()
|
||||
go m.monitorHealthAndRedeploy(ctx)
|
||||
// ctx := context.Background()
|
||||
// go m.monitorHealthAndRedeploy(ctx)
|
||||
|
||||
_ = m.runManager(func() error {
|
||||
//save config to local storage
|
||||
|
|
|
|||
Loading…
Reference in New Issue