MCPcopy Index your code
hub / github.com/1Panel-dev/1Panel / IsEnable

Method IsEnable

core/utils/controller/manager/openrc.go:29–31  ·  view source on GitHub ↗
(serviceName string)

Source from the content-addressed store, hash-verified

27 return err == nil, nil
28}
29func (s *Openrc) IsEnable(serviceName string) (bool, error) {
30 return isSysvServiceEnabled(serviceName)
31}
32func (s *Openrc) IsExist(serviceName string) (bool, error) {
33 if _, err := os.Stat(filepath.Join("/etc/init.d", serviceName)); err != nil {
34 if os.IsNotExist(err) {

Callers

nothing calls this directly

Calls 1

isSysvServiceEnabledFunction · 0.70

Tested by

no test coverage detected