summaryrefslogtreecommitdiff
path: root/manifests/host/cgi.pp
diff options
context:
space:
mode:
authorduritong <peter.meier+github@immerda.ch>2013-05-27 13:57:59 -0700
committerduritong <peter.meier+github@immerda.ch>2013-05-27 13:57:59 -0700
commit35107f366832d4084ccebc0b00e77d7866f29aed (patch)
treec37879ce14a4741fb019e1edb1bea7cf4d76e5d8 /manifests/host/cgi.pp
parent25af3539109093e40e8d4a1735b9a7916e40ebcc (diff)
parente9f80adaa87d5a6a906e406792629372ad15cc5f (diff)
Merge pull request #11 from oxilion/cgi-owner-param
Make the CGI owner configurable
Diffstat (limited to 'manifests/host/cgi.pp')
-rw-r--r--manifests/host/cgi.pp6
1 files changed, 4 insertions, 2 deletions
diff --git a/manifests/host/cgi.pp b/manifests/host/cgi.pp
index 4c0d0c9..6e5efcd 100644
--- a/manifests/host/cgi.pp
+++ b/manifests/host/cgi.pp
@@ -1,6 +1,8 @@
-class munin::host::cgi {
+class munin::host::cgi(
+ $owner = 'apache'
+) {
exec{'set_modes_for_cgi':
- command => 'chgrp apache /var/log/munin /var/log/munin/munin-graph.log && chmod g+w /var/log/munin /var/log/munin/munin-graph.log && find /var/www/html/munin/* -maxdepth 1 -type d -exec chgrp -R apache {} \; && find /var/www/html/munin/* -maxdepth 1 -type d -exec chmod -R g+w {} \;',
+ command => "chgrp ${owner} /var/log/munin /var/log/munin/munin-graph.log && chmod g+w /var/log/munin /var/log/munin/munin-graph.log && find /var/www/html/munin/* -maxdepth 1 -type d -exec chgrp -R ${owner} {} \; && find /var/www/html/munin/* -maxdepth 1 -type d -exec chmod -R g+w {} \;",
refreshonly => true,
subscribe => Concat::Fragment['munin.conf.header'],
}