move UID code

Signed-off-by: Jeff Carr <jcarr@wit.com>
This commit is contained in:
Jeff Carr 2024-01-06 05:32:52 -06:00
parent 4529b473dc
commit 1de593fd63
1 changed files with 8 additions and 0 deletions

View File

@ -5,6 +5,8 @@
package linuxstatus
import (
"os"
"os/user"
"strconv"
"go.wit.com/log"
@ -30,6 +32,12 @@ func linuxLoop() {
}
// me.IPv6.SetText(all)
user, _ := user.Current()
log.Println("os.Getuid =", user.Username, os.Getuid())
if (me.uid != nil) {
me.uid.Set(user.Username + " (" + strconv.Itoa(os.Getuid()) + ")")
}
/*
processName := getProcessNameByPort(53)
fmt.Println("Process with port 53:", processName)