mirror of
https://github.com/Control-D-Inc/ctrld.git
synced 2026-08-10 13:20:33 +02: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:
@@ -131,7 +131,8 @@ func unixSystemVServiceStatus() (service.Status, error) {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return service.StatusUnknown, nil
|
return service.StatusUnknown, nil
|
||||||
}
|
}
|
||||||
switch string(bytes.TrimSpace(out)) {
|
|
||||||
|
switch string(bytes.ToLower(bytes.TrimSpace(out))) {
|
||||||
case "running":
|
case "running":
|
||||||
return service.StatusRunning, nil
|
return service.StatusRunning, nil
|
||||||
default:
|
default:
|
||||||
|
|||||||
Reference in New Issue
Block a user