From 171359a8c4c9db71d1001fb7e51c98a23e80cae2 Mon Sep 17 00:00:00 2001 From: mwiegand Date: Thu, 18 Aug 2022 11:49:10 +0200 Subject: [PATCH] get output from actual service --- bundles/systemd-timers/files/check_systemd_timer | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/bundles/systemd-timers/files/check_systemd_timer b/bundles/systemd-timers/files/check_systemd_timer index 6cee33e..d3f2227 100644 --- a/bundles/systemd-timers/files/check_systemd_timer +++ b/bundles/systemd-timers/files/check_systemd_timer @@ -5,7 +5,9 @@ if systemctl is-failed "$Triggers" then InvocationID=$(systemctl show "$Triggers" --property=InvocationID --value) ExitCode=$(systemctl show "$Triggers" -p ExecStartEx --value | sed 's/^{//' | sed 's/}$//' | tr ';' '\n' | xargs -n 1 | grep '^status=' | cut -d '=' -f 2) - journalctl INVOCATION_ID="$InvocationID" --output cat + journalctl INVOCATION_ID="$InvocationID" --output cat # timer invocation output + echo "-----------------" + journalctl _SYSTEMD_INVOCATION_ID="$InvocationID" --output cat -n 32 # service invocation output exit 1 else exit 0