summaryrefslogtreecommitdiff
path: root/manifests
diff options
context:
space:
mode:
authorKeith Burdis <keith@burdis.org>2013-02-08 16:02:56 +0000
committerKeith Burdis <keith@burdis.org>2013-02-08 16:02:56 +0000
commite255fdd16537226a18c5b58a837f875c020943dd (patch)
tree6a6ab2dd047cbc73a7d15a5cfbd1fcedb234ad1e /manifests
parent32297aace9a2f8ef1117ea233335b93f8fb0aee2 (diff)
Avoid 'You can call check_mk only as OMD site user' bug.
Diffstat (limited to 'manifests')
-rw-r--r--manifests/config.pp9
1 files changed, 3 insertions, 6 deletions
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',
}
}