diff options
Diffstat (limited to 'modules')
-rw-r--r-- | modules/report-irc_ii/lib/puppet/reports/irc_ii.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/modules/report-irc_ii/lib/puppet/reports/irc_ii.rb b/modules/report-irc_ii/lib/puppet/reports/irc_ii.rb index 4d3dbb01..3262f3ce 100644 --- a/modules/report-irc_ii/lib/puppet/reports/irc_ii.rb +++ b/modules/report-irc_ii/lib/puppet/reports/irc_ii.rb @@ -19,7 +19,9 @@ Puppet::Reports.register_report(:irc_ii) do def process if self.status == 'failed' message = "Puppet run for #{self.host} #{self.status} at #{Time.now.asctime}." - Puppet::Util::SUIDManager.run_and_capture("echo #{message} > #{II_PATH}" , "nobody", "nogroup") + if File.exist?(II_PATH) + Puppet::Util::SUIDManager.run_and_capture("echo #{message} > #{II_PATH}" , "nobody", "nogroup") + end end end end |