cmd/ctrld: lower status string before checking

Depending on system, the output of `/etc/init.d/ctrld status` can be
either "Running" or "running", we must do in-sensitive comparison to get
the right status of ctrld.
This commit is contained in:
Cuong Manh Le
2023-07-07 01:09:45 +07:00
committed by Cuong Manh Le
parent 6c2996a921
commit ab1d7fd796

View File

@@ -131,7 +131,8 @@ func unixSystemVServiceStatus() (service.Status, error) {
if err != nil {
return service.StatusUnknown, nil
}
switch string(bytes.TrimSpace(out)) {
switch string(bytes.ToLower(bytes.TrimSpace(out))) {
case "running":
return service.StatusRunning, nil
default: