GetSSHAuthStatus outputs sshAuth status and warning if not running or healthy, as applicable.
()
| 218 | // GetSSHAuthStatus outputs sshAuth status and warning if not |
| 219 | // running or healthy, as applicable. |
| 220 | func GetSSHAuthStatus() string { |
| 221 | label := map[string]string{ |
| 222 | "com.docker.compose.project": SSHAuthName, |
| 223 | "com.docker.compose.oneoff": "False", |
| 224 | } |
| 225 | c, err := dockerutil.FindContainerByLabels(label) |
| 226 | |
| 227 | if err != nil { |
| 228 | util.Error("Failed to execute FindContainerByLabels(%v): %v", label, err) |
| 229 | return SiteStopped |
| 230 | } |
| 231 | if c == nil { |
| 232 | return SiteStopped |
| 233 | } |
| 234 | health, _ := dockerutil.GetContainerHealth(c) |
| 235 | return health |
| 236 | } |
no test coverage detected