diff options
author | varac <varacanero@zeromail.org> | 2014-02-11 17:39:37 +0100 |
---|---|---|
committer | varac <varacanero@zeromail.org> | 2014-02-11 17:39:37 +0100 |
commit | 142eee6d9162c762c35fb79312ec572ce274b6d0 (patch) | |
tree | a7c66f017fbfdc4f07846c02114c6a69cffc1e21 /puppet | |
parent | 9a13819dbe7c8e8a51f802356e6fbebe32a7a11f (diff) |
properly purge nagios3/conf.d dir
Diffstat (limited to 'puppet')
-rw-r--r-- | puppet/modules/site_nagios/manifests/server/purge.pp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/puppet/modules/site_nagios/manifests/server/purge.pp b/puppet/modules/site_nagios/manifests/server/purge.pp index 18993586..1c12cfb0 100644 --- a/puppet/modules/site_nagios/manifests/server/purge.pp +++ b/puppet/modules/site_nagios/manifests/server/purge.pp @@ -10,8 +10,9 @@ class site_nagios::server::purge inherits nagios::base { purge => false } + # only purge find in the /etc/nagios3/conf.d/ dir, not in any subdir exec {'purge_conf.d': - command => '/bin/rm -f /etc/nagios3/conf.d/nagios_*', - onlyif => 'find /etc/nagios3/conf.d/ | grep -q "/etc/nagios3/conf.d/nagios_"' + command => '/usr/bin/find /etc/nagios3/conf.d/ -maxdepth 1 -type f -exec rm {} \;', + onlyif => '/usr/bin/find /etc/nagios3/conf.d/ -maxdepth 1 -type f | grep -q "/etc/nagios3/conf.d"' } } |