mirror of
https://github.com/nix-community/home-manager.git
synced 2026-01-11 17:39:37 +08:00
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
This commit is contained in:
committed by
Austin Horstman
parent
d9ded14b74
commit
80437a57ca
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user