♻️ Use session proxy when stopping systemd target
This commit is contained in:
parent
c450a9ed0d
commit
d13768607c
2 changed files with 13 additions and 3 deletions
|
|
@ -42,8 +42,8 @@ async fn main() -> Result<()> {
|
|||
.wrap_err("failed to start systemd target")?;
|
||||
// Always stop the target when the process exits or panics.
|
||||
scopeguard::defer! {
|
||||
if let Ok(manager) = systemd_client::manager::build_blocking_proxy() {
|
||||
manager.stop_unit("cosmic-session.target", "replace").ok();
|
||||
if let Err(error) = systemd::stop_systemd_target() {
|
||||
error!("failed to stop systemd target: {:?}", error);
|
||||
}
|
||||
}
|
||||
let env_vars = env_rx
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue