diff --git a/README.md b/README.md index 4f19c7d..81a2972 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ go build The config file should have a `source` endpoint and each record to be updated: ```yaml -resource: "https://api.ipify.org?format=text" +source: "https://api.ipify.org?format=text" records: - cron: "@hourly" diff --git a/main.go b/main.go index 36f8341..583dd17 100644 --- a/main.go +++ b/main.go @@ -136,7 +136,7 @@ func ScheduleJob(conf *Config, c *cron.Cron, r Record) { func main() { if len(os.Args) < 2 { - log.Printf("not enough arguments: ./home-dns config.yml") + log.Printf("not enough arguments: %s config.yml", os.Args[0]) return } @@ -148,8 +148,6 @@ func main() { return } - // open a session (first, to fail early) - // schedule cron jobs c := cron.New() for _, r := range conf.Records { @@ -159,7 +157,7 @@ func main() { stop := make(chan os.Signal) signal.Notify(stop, os.Interrupt, os.Kill) - <-stop + <-stop c.Stop() }