]> code.delx.au - monosys/blobdiff - healthcheck/systemd-user-units
healthcheck fixes
[monosys] / healthcheck / systemd-user-units
diff --git a/healthcheck/systemd-user-units b/healthcheck/systemd-user-units
new file mode 100755 (executable)
index 0000000..5f8a406
--- /dev/null
@@ -0,0 +1,13 @@
+#!/bin/bash
+
+if systemctl --user is-system-running > /dev/null; then
+    exit 0
+fi
+
+if systemctl --user is-system-running 2>&1 | grep -q 'Failed to connect to bus'; then
+    exit 0
+fi
+
+echo -e "# systemctl --user --failed"
+systemctl --user --failed
+exit 1