Allow a subset of checks to be run.
[rcheck] / check.d / 10.daemons
diff --git a/check.d/10.daemons b/check.d/10.daemons
new file mode 100755 (executable)
index 0000000..78dc3a3
--- /dev/null
@@ -0,0 +1,17 @@
+#! /bin/sh
+
+rc=0
+
+check () {
+  path=$1
+  if [ -x $path ] && ! pgrep -x ${path##*/} >/dev/null; then
+    echo >&2 $path not running
+    rc=1
+  fi
+}
+
+check /usr/sbin/ekeyd
+check /usr/sbin/ekeyd-egd-linux
+check /usr/sbin/yaid
+
+exit $rc