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

Method Status

agent/utils/toolbox/fail2ban.go:41–47  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

39}
40
41func (f *Fail2ban) Status() (bool, bool, bool) {
42 isEnable, _ := controller.CheckEnable("fail2ban.service")
43 isActive, _ := controller.CheckActive("fail2ban.service")
44 isExist, _ := controller.CheckExist("fail2ban.service")
45
46 return isEnable, isActive, isExist
47}
48
49func (f *Fail2ban) Version() string {
50 stdout, err := cmd.NewCommandMgr(cmd.WithTimeout(20*time.Second)).RunWithStdout("fail2ban-client", "version")

Callers

nothing calls this directly

Calls 1

CheckExistMethod · 0.65

Tested by

no test coverage detected