krebs.on-failure: send journal since start of failed plan

This commit is contained in:
tv 2016-04-17 02:04:52 +02:00
parent 2b0c6616b6
commit e4422212d4

View File

@ -84,6 +84,14 @@
${pkgs.systemd}/bin/journalctl \
--lines=${toString plan.journalctl.lines} \
--output=${plan.journalctl.output} \
--since="$(
${pkgs.coreutils}/bin/date +'%F %T UTC' -ud "$(
${pkgs.systemd}/bin/systemctl show \
-p ExecMainStartTimestamp \
${shell.escape plan.name} \
| ${pkgs.coreutils}/bin/cut -d= -f2-
)"
)" \
--unit=${shell.escape plan.name}.service
} | ${shell.escape cfg.sendmail} -t
'';