Fixed bug where DDNSUpdater doesn't update if we start from a new service with current IP address

This commit is contained in:
Hamza Zakaria 2026-06-02 14:08:27 +01:00
parent bb54b722d9
commit eb7bb4c4d7
2 changed files with 6 additions and 0 deletions

Binary file not shown.

View File

@ -160,6 +160,12 @@ func main() {
fmt.Println(time.Now(), "Starting with current IP:", lastIP)
}
if err := updateDDNS(holder.get().UpdateURL); err != nil {
fmt.Println("Failed to update DDNS:", err)
} else {
fmt.Println(time.Now(), "DDNS updated successfully")
}
ticker := time.NewTicker(time.Duration(cfg.CheckIntervalSecs) * time.Second)
defer ticker.Stop()