mirror of
https://github.com/Buriburizaem0n/nezha_domains.git
synced 2026-05-06 05:38:50 +00:00
feat: implement VPS/Domain expiry notifications and native SMTP support
This commit is contained in:
@@ -99,6 +99,7 @@ func updateConfig(c *gin.Context) (any, error) {
|
||||
singleton.Conf.InstallHost = sf.InstallHost
|
||||
singleton.Conf.IgnoredIPNotification = sf.IgnoredIPNotification
|
||||
singleton.Conf.IPChangeNotificationGroupID = sf.IPChangeNotificationGroupID
|
||||
singleton.Conf.ExpiryNotificationGroupID = sf.ExpiryNotificationGroupID
|
||||
singleton.Conf.SiteName = sf.SiteName
|
||||
singleton.Conf.DNSServers = sf.DNSServers
|
||||
singleton.Conf.CustomCode = sf.CustomCode
|
||||
|
||||
@@ -75,6 +75,15 @@ func initSystem(bus chan<- *model.Service) error {
|
||||
if _, err := singleton.CronShared.AddFunc("0 0 * * * *", func() { singleton.RecordTransferHourlyUsage() }); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
// 每天 12:00 检查域名与服务器到期
|
||||
if _, err := singleton.CronShared.AddFunc("0 0 12 * * *", func() {
|
||||
singleton.CronJobForDomainStatus()
|
||||
singleton.CronJobForServerStatus()
|
||||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user