From 80437a57cada22fbe4a8855810e08cb12245870e Mon Sep 17 00:00:00 2001 From: Jairo Llopis Date: Fri, 24 Oct 2025 12:47:34 +0100 Subject: [PATCH] lorri: don't start until daemon is really running Sometimes a race condition will make the events stream start after the daemon is running, and then no events will be streamed. This fixes the problem by checking the daemon status and failing the unit if not ready yet. It will restart 5 seconds later, which will probably be enough. @moduon MT-1075 --- modules/services/lorri.nix | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/modules/services/lorri.nix b/modules/services/lorri.nix index 84b6d04c0..39b53c4dd 100644 --- a/modules/services/lorri.nix +++ b/modules/services/lorri.nix @@ -100,6 +100,12 @@ in }; Service = { + # Don't start until lorri daemon is actually running + ExecStartPre = pkgs.writeShellScript "lorri-notify-check" '' + lorri info --shell-file . | grep 'Lorri Daemon Status:.*running' + ''; + RestartSec = "5s"; + ExecStart = let jqFile = '' @@ -129,6 +135,7 @@ in with pkgs; [ bash + gnugrep jq libnotify cfg.package