Consider systemd status only relevant if unit is available
If the unit is not available is is not possible to tell whether the service is running or not so the systemd status should not be considered yet. As soon as the status changes Systemd::apply() is executed again and the status possibly considered.
This commit is contained in:
parent
7e46096feb
commit
1ce8ec9c5f
|
@ -422,7 +422,7 @@ Systemd::ServiceStatus Systemd::apply(
|
|||
if (!service) {
|
||||
return ServiceStatus{};
|
||||
}
|
||||
const auto isRelevant = service->isSystemdAvailable() && connection.isLocal();
|
||||
const auto isRelevant = service->isSystemdAvailable() && service->isUnitAvailable() && connection.isLocal();
|
||||
const auto isRunning = service->isRunning();
|
||||
const auto consideredForReconnect = considerForReconnect && isRelevant;
|
||||
|
||||
|
|
Loading…
Reference in New Issue