From e255fdd16537226a18c5b58a837f875c020943dd Mon Sep 17 00:00:00 2001 From: Keith Burdis Date: Fri, 8 Feb 2013 16:02:56 +0000 Subject: Avoid 'You can call check_mk only as OMD site user' bug. --- manifests/config.pp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'manifests/config.pp') diff --git a/manifests/config.pp b/manifests/config.pp index 29af0e1..edd14d9 100644 --- a/manifests/config.pp +++ b/manifests/config.pp @@ -72,20 +72,17 @@ class check_mk::config ( } # re-read config if it changes exec { 'check_mk-refresh': - command => "${bin_dir}/check_mk -I", - user => $site, + command => "/bin/su -l -c '${bin_dir}/check_mk -I' ${site}", refreshonly => true, notify => Exec['check_mk-reload'], } exec { 'check_mk-reload': - command => "${bin_dir}/check_mk -O", - user => $site, + command => "/bin/su -l -c '${bin_dir}/check_mk -O' ${site}", refreshonly => true, } # re-read inventory at least daily exec { 'check_mk-refresh-inventory-daily': - command => "${bin_dir}/cmk -I", - user => $site, + command => "/bin/su -l -c '${bin_dir}/check_mk -O' ${site}", schedule => 'daily', } } -- cgit v1.2.3