mirror of
https://github.com/balena-os/balena-supervisor.git
synced 2025-03-21 11:35:18 +00:00
gosuper: Treat systemd unit states that are not "inactive" or "deactivating" as enabled states
This should make the supervisor detect the VPN as enabled when it's starting up (or restarting because of an error). Change-Type: patch Signed-off-by: Pablo Carranza Velez <pablo@resin.io>
This commit is contained in:
parent
3b60065f12
commit
58bb660758
@ -124,7 +124,8 @@ func getUnitStatus(unitName string) (state bool, err error) {
|
||||
err = fmt.Errorf("Unable to get unit status: %v", e)
|
||||
return
|
||||
} else {
|
||||
state = activeState.Value.String() == `"active"`
|
||||
activeStateStr := activeState.Value.String()
|
||||
state = activeStateStr != `"inactive"` && activeStateStr != `"deactivating"`
|
||||
return
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user