diff options
| author | Jeff Carr <[email protected]> | 2023-03-26 16:17:32 -0500 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2023-03-26 16:17:32 -0500 |
| commit | 70a7ca6d75b0bffbd184b1780bca5a9b0db46c70 (patch) | |
| tree | 3241a5fb24af3624da8abb7380a450116a2ea1ee /main.go | |
| parent | 53c8c54b15d396f4efe4335948404814ac04a4dd (diff) | |
everything auto-updates on open
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'main.go')
| -rw-r--r-- | main.go | 18 |
1 files changed, 15 insertions, 3 deletions
@@ -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) + } } |
