14 lines
275 B
Go
14 lines
275 B
Go
//go:build !windows
|
|
|
|
package deploy
|
|
|
|
import (
|
|
"os/exec"
|
|
"strings"
|
|
)
|
|
|
|
func workerProcessRunning(imageName string) bool {
|
|
out, err := exec.Command("pgrep", "-x", strings.TrimSuffix(imageName, ".exe")).Output()
|
|
return err == nil && len(strings.TrimSpace(string(out))) > 0
|
|
}
|