MCPcopy Create free account
hub / github.com/1Panel-dev/1Panel / IsActive

Method IsActive

core/utils/controller/manager/sysvinit.go:24–27  ·  view source on GitHub ↗
(serviceName string)

Source from the content-addressed store, hash-verified

22 return "sysvinit"
23}
24func (s *Sysvinit) IsActive(serviceName string) (bool, error) {
25 _, err := cmd.NewCommandMgr().RunWithStdout("service", serviceName, "status")
26 return err == nil, nil
27}
28func (s *Sysvinit) IsEnable(serviceName string) (bool, error) {
29 return isSysvServiceEnabled(serviceName)
30}

Callers

nothing calls this directly

Calls 1

RunWithStdoutMethod · 0.45

Tested by

no test coverage detected