summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xfiles/plugins/selinuxenforced7
-rw-r--r--manifests/host.pp6
2 files changed, 11 insertions, 2 deletions
diff --git a/files/plugins/selinuxenforced b/files/plugins/selinuxenforced
index 16a3f66..e157e3d 100755
--- a/files/plugins/selinuxenforced
+++ b/files/plugins/selinuxenforced
@@ -23,5 +23,8 @@ if [ "$1" = "config" ]; then
exit 0
fi
-echo -n "enforced.value " && cat /selinux/enforce
-
+if [ -r /selinux/enforce ]; then
+ echo -n "enforced.value " && cat /selinux/enforce
+else
+ echo "enforced.value 0"
+fi
diff --git a/manifests/host.pp b/manifests/host.pp
index fdaa255..21cf7df 100644
--- a/manifests/host.pp
+++ b/manifests/host.pp
@@ -34,6 +34,12 @@ class munin::host
case $operatingsystem {
centos: { include munin::host::cgi }
}
+
+ # from time to time we cleanup hanging munin-runs
+ file{'/etc/cron.d/munin_kill':
+ content => "4,34 * * * * root if $(ps ax | grep -v grep | grep -q munin-run); then killall munin-run; fi\n",
+ owner => root, group => 0, mode => 0644;
+ }
}
class munin::host::cgi {