Set executable bit on runit run scripts.

This commit is contained in:
Matthijs Langenberg
2011-11-09 10:15:23 +01:00
committed by David Dollar
parent 48cc60c30f
commit 91140638e1
2 changed files with 4 additions and 2 deletions

View File

@@ -29,7 +29,8 @@ class Foreman::Export::Runit < Foreman::Export::Base
run = ERB.new(run_template).result(binding)
write_file "#{process_directory}/run", run
FileUtils.chmod 0755, "#{process_directory}/run"
port = engine.port_for(process, num, options[:port])
environment_variables = {'PORT' => port}.
merge(engine.environment).
@@ -41,7 +42,7 @@ class Foreman::Export::Runit < Foreman::Export::Base
log_run = ERB.new(log_run_template).result(binding)
write_file "#{process_log_directory}/run", log_run
FileUtils.chmod 0755, "#{process_log_directory}/run"
end
end

View File

@@ -10,6 +10,7 @@ describe Foreman::Export::Runit do
before(:each) { load_export_templates_into_fakefs("runit") }
before(:each) { stub(runit).say }
before(:each) { stub(FakeFS::FileUtils).chmod }
it "exports to the filesystem" do
FileUtils.mkdir_p('/tmp/init')