mirror of
https://github.com/EnumeratedDev/enit.git
synced 2026-09-16 02:26:11 +00:00
ectl: hide service PID if it is 0
This commit is contained in:
@@ -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