correct update-check

This commit is contained in:
2024-01-19 20:17:50 -06:00
parent 567cfe8083
commit ef68e8c4a2
4 changed files with 31 additions and 367 deletions

View File

@@ -56,7 +56,7 @@ func main() {
}
}
if len(cves) == 0 {
if err := dns.Update("istheinternetonfire.app", "TXT", "Safe for now!"); err != nil {
if err := dns.UpdateTXT("istheinternetonfire.app", "TXT", "Safe for now!"); err != nil {
config.Cfg.Log.Error("unable to update dns record", "error", err)
time.Sleep(time.Second * time.Duration(config.Cfg.RefreshSeconds))
continue
@@ -69,7 +69,7 @@ func main() {
for _, v := range cves[len(cves)-num:] {
txtData += fmt.Sprintf("%s - %s - %s\n", v.CveID, v.Product, v.ShortDescription)
}
if err := dns.Update("istheinternetonfire.app", "TXT", txtData); err != nil {
if err := dns.UpdateTXT("istheinternetonfire.app", "TXT", txtData); err != nil {
config.Cfg.Log.Error("unable to update dns record", "error", err)
time.Sleep(time.Second * time.Duration(config.Cfg.RefreshSeconds))
continue