[Add] systemd log wrapper to nix flake
This commit is contained in:
parent
83bd05b791
commit
045e2ff15c
1 changed files with 3 additions and 2 deletions
|
|
@ -178,13 +178,14 @@
|
||||||
|
|
||||||
ExecStart = if cfg.useTmux then
|
ExecStart = if cfg.useTmux then
|
||||||
pkgs.writeShellScript "iota-start" ''
|
pkgs.writeShellScript "iota-start" ''
|
||||||
${pkgs.tmux}/bin/tmux -S ${cfg.dataDir}/tmux.sock new-session -d -s iota ${cfg.package}/bin/iota
|
${pkgs.tmux}/bin/tmux -S ${cfg.dataDir}/tmux.sock new-session -d -s iota \
|
||||||
|
'${cfg.package}/bin/iota 2>&1 | ${pkgs.systemd}/bin/systemd-cat -t iota-daemon'
|
||||||
while ${pkgs.tmux}/bin/tmux -S ${cfg.dataDir}/tmux.sock has-session -t iota 2>/dev/null; do
|
while ${pkgs.tmux}/bin/tmux -S ${cfg.dataDir}/tmux.sock has-session -t iota 2>/dev/null; do
|
||||||
sleep 2
|
sleep 2
|
||||||
done
|
done
|
||||||
''
|
''
|
||||||
else
|
else
|
||||||
"${cfg.package}/bin/iota";
|
"${pkgs.systemd}/bin/systemd-cat -t iota-daemon ${cfg.package}/bin/iota";
|
||||||
|
|
||||||
ExecStartPre = [
|
ExecStartPre = [
|
||||||
("+" + pkgs.writeShellScript "iota-setup" ''
|
("+" + pkgs.writeShellScript "iota-setup" ''
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue