Class: Foreman::Export::InitdMonit

Inherits:
Base
  • Object
show all
Includes:
Initd::Export
Defined in:
lib/foreman/export/initd_monit.rb

Instance Method Summary collapse

Instance Method Details

#exportObject



6
7
8
9
10
11
12
13
14
15
16
17
18
19
# File 'lib/foreman/export/initd_monit.rb', line 6

def export
  error('Must specify a location') unless location
  setup
  engine.each_process do |name, process|
    concurrency = concurrency name
    path = path name
    if concurrency > 0
      say 'Warning: Initd exporter ignores concurrency > 1' if concurrency > 1
      contents = Initd::MonitConfig.new(app, path).content
      export_file path, contents
    end
  end
  cleanup
end