mirror of
https://github.com/fankes/komari-agent.git
synced 2025-10-20 03:29:24 +08:00
feat: add kernel version reporting for all platforms
This commit is contained in:
@@ -19,3 +19,14 @@ func OSName() string {
|
||||
name := strings.TrimSpace(string(output))
|
||||
return name
|
||||
}
|
||||
|
||||
// KernelVersion returns the kernel version on FreeBSD
|
||||
func KernelVersion() string {
|
||||
cmd := exec.Command("uname", "-r")
|
||||
output, err := cmd.Output()
|
||||
if err != nil {
|
||||
return "Unknown"
|
||||
}
|
||||
|
||||
return strings.TrimSpace(string(output))
|
||||
}
|
||||
|
Reference in New Issue
Block a user