Parcourir la source

statuscheck: add script to check current systemd status

guillaume il y a 8 ans
Parent
commit
c9f91e13c6
2 fichiers modifiés avec 9 ajouts et 1 suppressions
  1. 1 1
      src/sanitycheck
  2. 8 0
      src/statuscheck

+ 1 - 1
src/sanitycheck

@@ -1,6 +1,6 @@
 #!/bin/sh
 #!/bin/sh
 
 
-LOGGER="logger -t sanitycheck -s"
+LOGGER="logger -t concierge -s"
 
 
 # ifup: verify interface configuration
 # ifup: verify interface configuration
 if type "ifquery" > /dev/null; then
 if type "ifquery" > /dev/null; then

+ 8 - 0
src/statuscheck

@@ -0,0 +1,8 @@
+#!/bin/sh
+
+LOGGER="logger -t concierge -s"
+
+# systemd: list units in a failed state
+if type "systemctl" > /dev/null; then
+  systemctl list-units --failed --plain --no-legend 2>&1 | $LOGGER
+fi