mirror of
https://github.com/nix-community/home-manager.git
synced 2025-11-08 19:46:05 +01: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:
parent
d9ded14b74
commit
80437a57ca
1 changed files with 7 additions and 0 deletions
|
|
@ -100,6 +100,12 @@ in
|
||||||
};
|
};
|
||||||
|
|
||||||
Service = {
|
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 =
|
ExecStart =
|
||||||
let
|
let
|
||||||
jqFile = ''
|
jqFile = ''
|
||||||
|
|
@ -129,6 +135,7 @@ in
|
||||||
with pkgs;
|
with pkgs;
|
||||||
[
|
[
|
||||||
bash
|
bash
|
||||||
|
gnugrep
|
||||||
jq
|
jq
|
||||||
libnotify
|
libnotify
|
||||||
cfg.package
|
cfg.package
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue