mirror of
https://github.com/Control-D-Inc/ctrld.git
synced 2026-02-03 22:18:39 +00:00
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:
committed by
Cuong Manh Le
parent
6c2996a921
commit
ab1d7fd796
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user