From 864ca3a897a82da510a0c1177a5d63d1eefeb9a4 Mon Sep 17 00:00:00 2001 From: Ossi Salmi Date: Mon, 14 Jan 2013 12:49:25 +0200 Subject: [PATCH] Fixed munin log paths and permissions for EPEL packages --- munin/manifests/init.pp | 11 +++++------ munin/templates/munin-node.conf.erb | 11 +++++------ 2 files changed, 10 insertions(+), 12 deletions(-) diff --git a/munin/manifests/init.pp b/munin/manifests/init.pp index b760e1f..45e0044 100644 --- a/munin/manifests/init.pp +++ b/munin/manifests/init.pp @@ -249,12 +249,11 @@ class munin::server { require => File["/var/cache/munin"], } - file { [ "/var/log/munin/munin-cgi-graph.log", - "/var/log/munin/munin-cgi-html.log", ]: - ensure => present, - mode => "0664", - owner => "munin", - group => $apache::sslserver::group, + file { "/var/log/munin": + ensure => directory, + mode => "0775", + owner => $apache::sslserver::user, + group => "munin", require => Package["munin"], } file { "/etc/logrotate.d/munin-cgi": diff --git a/munin/templates/munin-node.conf.erb b/munin/templates/munin-node.conf.erb index d743c6a..e8ccad9 100644 --- a/munin/templates/munin-node.conf.erb +++ b/munin/templates/munin-node.conf.erb @@ -3,11 +3,15 @@ # log_level 4 +<% if ['CentOS','Fedora','RedHat'].index(operatingsystem) -%> +log_file /var/log/munin-node/munin-node.log +<% else -%> log_file /var/log/munin/munin-node.log +<% end -%> pid_file /var/run/munin/munin-node.pid background 1 -setseid 1 +setsid 1 user root <% if operatingsystem == "OpenBSD" -%> @@ -15,10 +19,8 @@ group wheel <% else -%> group root <% end -%> -setsid yes # Regexps for files to ignore - ignore_file ~$ ignore_file \.bak$ ignore_file %$ @@ -29,7 +31,6 @@ ignore_file \.pod$ # Set this if the client doesn't report the correct hostname when # telnetting to localhost, port 4949 # -#host_name ppc3.fedora.redhat.com host_name <%= homename %> # A list of addresses that are allowed to connect. This must be a @@ -41,8 +42,6 @@ allow <%= munin_allow %> # Which address to bind to; host <%= ipaddress %> -# host 127.0.0.1 # And which port port 4949 -