mirror of
https://github.com/EnumeratedDev/enit.git
synced 2026-10-31 10:51:48 +00:00
ectl: hide service PID if it is 0
This commit is contained in:
1 file changed
+2
-2
@@ -285,7 +285,7 @@ func showServiceStatus() {
|
|||||||
} else {
|
} else {
|
||||||
fmt.Printf("Enabled: %t\n", serviceEnabled)
|
fmt.Printf("Enabled: %t\n", serviceEnabled)
|
||||||
}
|
}
|
||||||
if serviceState == "running" {
|
if serviceState == "running" && processID > 0 {
|
||||||
fmt.Printf("Process ID: %d\n", processID)
|
fmt.Printf("Process ID: %d\n", processID)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -358,7 +358,7 @@ func listAllServices() {
|
|||||||
} else {
|
} else {
|
||||||
fmt.Printf("Enabled: %t\n", serviceEnabled)
|
fmt.Printf("Enabled: %t\n", serviceEnabled)
|
||||||
}
|
}
|
||||||
if serviceState == "running" {
|
if serviceState == "running" && processID > 0 {
|
||||||
fmt.Printf("Process ID: %d\n", processID)
|
fmt.Printf("Process ID: %d\n", processID)
|
||||||
}
|
}
|
||||||
fmt.Println()
|
fmt.Println()
|
||||||
|
|||||||
Reference in new issue
Block a user