Merge pull request #261 from martinisoft/launchd_environment

Launchd environment
This commit is contained in:
David Dollar
2012-09-14 01:34:35 -07:00
7 changed files with 69 additions and 2 deletions
+1 -1
View File
@@ -119,7 +119,7 @@ private ######################################################################
end
def write_template(name, target, binding)
compiled = ERB.new(export_template(name)).result(binding)
compiled = ERB.new(export_template(name), nil, '-').result(binding)
write_file target, compiled
end
+2
View File
@@ -7,6 +7,8 @@ class Foreman::Export::Launchd < Foreman::Export::Base
super
engine.each_process do |name, process|
1.upto(engine.formation[name]) do |num|
port = engine.port_for(process, num)
command_args = process.command.split(" ")
write_template "launchd/launchd.plist.erb", "#{app}-#{name}-#{num}.plist", binding
end
end