aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xcheck_systemd10
1 files changed, 5 insertions, 5 deletions
diff --git a/check_systemd b/check_systemd
index b2b140c..ef09146 100755
--- a/check_systemd
+++ b/check_systemd
@@ -5,11 +5,6 @@
FAILED=()
-if ! systemctl is-system-running > /dev/null; then
- echo systemd CRITICAL: System state degraded.
- exit 2
-fi
-
for unit in "$@"; do
if ! systemctl is-active "$unit" > /dev/null; then
FAILED+=("$unit")
@@ -21,5 +16,10 @@ if [ ${#FAILED[@]} -gt 0 ]; then
exit 2
fi
+if ! systemctl is-system-running > /dev/null; then
+ echo systemd WARNING: System state degraded.
+ exit 1
+fi
+
echo "systemd OK: $# units checked"
exit 0