summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2023-04-12 12:04:52 -0500
committerJeff Carr <[email protected]>2023-04-12 12:04:52 -0500
commitd7be21524c6203c5377aff992912aa12bc912d0e (patch)
treed50ba0f04a524a1686eca91b0c8297c01cd2b06d
parent7d41abd543121c7c5f153acc2a5ed6828af50cb1 (diff)
only try once
Signed-off-by: Jeff Carr <[email protected]>
-rw-r--r--Makefile3
-rw-r--r--main.go4
-rw-r--r--update.go2
3 files changed, 7 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index be8c171..a296726 100644
--- a/Makefile
+++ b/Makefile
@@ -1,3 +1,6 @@
+build:
+ go build
+
farm001:
./go-nsupdate \
--tsig-algorithm=hmac-sha512 \
diff --git a/main.go b/main.go
index a6c2733..4706e3e 100644
--- a/main.go
+++ b/main.go
@@ -91,8 +91,8 @@ func main() {
log.Printf("wait...")
if err := update.Done(); err != nil {
- log.Printf("update done: %v", err)
+ log.Printf("update failed: %v", err)
} else {
- log.Printf("update done")
+ log.Printf("update worked")
}
}
diff --git a/update.go b/update.go
index 2e37108..646a381 100644
--- a/update.go
+++ b/update.go
@@ -228,6 +228,8 @@ func (u *Update) run() {
retryTimer.Reset(retryTimeout)
log.Printf("update retry in %v...", retryTimeout)
+ log.Printf("only try once")
+ return
}
}
}