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

Function stopSSHSocketIfActive

agent/app/service/ssh.go:155–166  ·  view source on GitHub ↗
(serviceName string)

Source from the content-addressed store, hash-verified

153}
154
155func stopSSHSocketIfActive(serviceName string) error {
156 for _, socketName := range loadSSHSocketNames(serviceName) {
157 active, _ := controller.CheckActive(socketName)
158 if !active {
159 continue
160 }
161 if err := controller.HandleStop(socketName); err != nil {
162 return fmt.Errorf("stop %s failed, err: %v", socketName, err)
163 }
164 }
165 return nil
166}
167
168func disableSSHSocket(serviceName string, stopActive bool) error {
169 if stopActive {

Callers 3

OperateSSHMethod · 0.85
restartSSHServiceFunction · 0.85
disableSSHSocketFunction · 0.85

Calls 2

loadSSHSocketNamesFunction · 0.85
HandleStopMethod · 0.65

Tested by

no test coverage detected