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

Function loadServiceName

agent/app/service/ssh.go:1546–1553  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1544}
1545
1546func loadServiceName() (string, error) {
1547 if exist, _ := controller.CheckExist("sshd"); exist {
1548 return "sshd", nil
1549 } else if exist, _ := controller.CheckExist("ssh"); exist {
1550 return "ssh", nil
1551 }
1552 return "", errors.New("The ssh or sshd service is unavailable")
1553}
1554
1555func loadDate(currentYear int, DateStr string, nyc *time.Location) time.Time {
1556 itemDate, err := time.ParseInLocation("2006 Jan 2 15:04:05", fmt.Sprintf("%d %s", currentYear, DateStr), nyc)

Callers 4

OperateSSHMethod · 0.85
UpdateMethod · 0.85
loadSSHServiceStatusFunction · 0.85
UpdateByFileMethod · 0.85

Calls 1

CheckExistMethod · 0.65

Tested by

no test coverage detected