feat: implement VPS/Domain expiry notifications and native SMTP support

This commit is contained in:
Bot
2026-04-16 21:36:49 +08:00
parent bc32f8fce4
commit 3d849b4b43
7 changed files with 134 additions and 5 deletions
+1
View File
@@ -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
+9
View File
@@ -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
}