Skip to content
This repository was archived by the owner on Dec 21, 2021. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion src/provider/systemdmanager/manager.rs
Original file line number Diff line number Diff line change
Expand Up @@ -356,8 +356,11 @@ impl SystemdManager {
}

pub fn is_running(&self, unit: &str) -> Result<bool, anyhow::Error> {
// We are using `LoadUnit` here, as GetUnit can fail seemingly at random, when the unit
// is not loaded due to systemd garbage collection.
// see https://github.com/systemd/systemd/issues/1929 for more information
let unit_node = self
.method_call("GetUnit", (&unit,))
.method_call("LoadUnit", (&unit,))
.map(|r: (Path,)| r.0)?;

let proxy = self
Expand Down