summaryrefslogtreecommitdiff
path: root/main.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2023-03-26 16:17:32 -0500
committerJeff Carr <[email protected]>2023-03-26 16:17:32 -0500
commit70a7ca6d75b0bffbd184b1780bca5a9b0db46c70 (patch)
tree3241a5fb24af3624da8abb7380a450116a2ea1ee /main.go
parent53c8c54b15d396f4efe4335948404814ac04a4dd (diff)
everything auto-updates on open
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'main.go')
-rw-r--r--main.go18
1 files changed, 15 insertions, 3 deletions
diff --git a/main.go b/main.go
index 1a232e1..57acc16 100644
--- a/main.go
+++ b/main.go
@@ -7,7 +7,7 @@ package main
import (
"strconv"
"runtime"
- // "net"
+ "time"
arg "github.com/alexflint/go-arg"
"git.wit.org/wit/gui"
)
@@ -71,17 +71,29 @@ func checkNetworkChanges() {
// Run this every once and a while
func dnsTTL() {
+ me.changed = false
log("FQDN =", me.fqdn.GetText())
getHostname()
scanInterfaces()
for i, t := range me.ifmap {
log(strconv.Itoa(i) + " iface = " + t.iface.Name)
}
+
var aaaa []string
aaaa = realAAAA()
+ var all string
for _, s := range aaaa {
log("my actual AAAA = ",s)
- // me.IPv6.AddText(s)
- me.IPv6.SetText(s)
+ all += s + "\n"
+ }
+ me.IPv6.SetText(all)
+
+ if (me.changed) {
+ stamp := time.Now().Format("2006/01/02 15:04:05")
+ s := stamp + " Network things changed"
+ log(logError, "Network things changed on", stamp)
+ updateDNS()
+ me.output.SetText(s)
+
}
}