summaryrefslogtreecommitdiffstats
path: root/check_systemd
diff options
context:
space:
mode:
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