summaryrefslogtreecommitdiffstats
path: root/check_systemd
diff options
context:
space:
mode:
authorTobias Wiese <tobias@tobiaswiese.com>2021-08-28 18:16:09 +0200
committerTobias Wiese <tobias@tobiaswiese.com>2021-08-28 18:16:09 +0200
commit196f3156eec283a6c6b0aac3a14a1ec9c5088023 (patch)
treee51a149a95cf27664091036971cfdfe05b8be551 /check_systemd
parenta119c3f1fb037ebd4ec543ec9ba57dffb0313b2c (diff)
parent46fcb1abce49b1494cec31e273cb5f74d22e7b85 (diff)
New upstream release: 1.1.0
1.1.0 Features: - Emit a list of failed units if there is at least one Signed-off-by: Tobias Wiese <tobias@tobiaswiese.com>
Diffstat (limited to 'check_systemd')
-rwxr-xr-xcheck_systemd8
1 files changed, 7 insertions, 1 deletions
diff --git a/check_systemd b/check_systemd
index c71682b..9912c48 100755
--- a/check_systemd
+++ b/check_systemd
@@ -23,4 +23,10 @@ fi
printf "SYSTEM %s: %d units failed.\n" "$SYSTEM_STATE" "$FAILED_UNITS"
-[ "0" = "$FAILED_UNITS" ] || exit 2
+if [ "0" = "$FAILED_UNITS" ]; then
+ exit 0
+else
+ printf "\nFailed units:\n"
+ systemctl list-units --failed --no-legend | awk '{print "- " $1;}'
+ exit 2
+fi