From db0bf1b32c5ea1b7d0725d7e7ff7fa3c8f4e89cd Mon Sep 17 00:00:00 2001 From: rkuklik Date: Tue, 25 Jun 2024 12:04:24 +0200 Subject: [PATCH] fix(daemon): rt dir creation --- daemon/src/daemon.rs | 1 - daemon/src/main.rs | 8 ++++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/daemon/src/daemon.rs b/daemon/src/daemon.rs index 22be6bb..f911c91 100644 --- a/daemon/src/daemon.rs +++ b/daemon/src/daemon.rs @@ -92,7 +92,6 @@ impl Daemon { }; } } - debug!("Created socket in {addr}"); Ok(()) } diff --git a/daemon/src/main.rs b/daemon/src/main.rs index ab6c228..a002847 100644 --- a/daemon/src/main.rs +++ b/daemon/src/main.rs @@ -12,7 +12,9 @@ use std::time::Instant; use cli::Cli; use common::ipc::IpcSocket; +use common::ipc::Server; use daemon::Daemon; +use log::debug; use log::error; use log::info; use log::Level; @@ -35,11 +37,13 @@ fn main() -> Result<(), Box> { // initialize the wayland connection, getting all the necessary globals let initializer = wayland::globals::init(cli.format); - let listener = IpcSocket::server()?; - // use the initializer to create the Daemon, then drop it to free up the memory let mut daemon = Daemon::new(initializer, !cli.no_cache)?; + // TODO: make socket part of daemon (beware of partial moves) + let listener = IpcSocket::server()?; + debug!("Created socket in {}", IpcSocket::::path()); + if let Ok(true) = sd_notify::booted() { if let Err(e) = sd_notify::notify(true, &[sd_notify::NotifyState::Ready]) { error!("Error sending status update to systemd: {e}");