ectl: hide service PID if it is 0

This commit is contained in:
2025-12-11 13:07:11 +02:00
parent fc738e6f4e
commit 49541f6f76
+2 -2
View File
@@ -285,7 +285,7 @@ func showServiceStatus() {
} else {
fmt.Printf("Enabled: %t\n", serviceEnabled)
}
if serviceState == "running" {
if serviceState == "running" && processID > 0 {
fmt.Printf("Process ID: %d\n", processID)
}
}
@@ -358,7 +358,7 @@ func listAllServices() {
} else {
fmt.Printf("Enabled: %t\n", serviceEnabled)
}
if serviceState == "running" {
if serviceState == "running" && processID > 0 {
fmt.Printf("Process ID: %d\n", processID)
}
fmt.Println()