Skip to content

Commit

Permalink
Set executable bit on runit run scripts.
Browse files Browse the repository at this point in the history
  • Loading branch information
mlangenberg authored and ddollar committed Jan 16, 2012
1 parent 48cc60c commit 9114063
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/foreman/export/runit.rb
Expand Up @@ -29,7 +29,8 @@ def export(location, options={})

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).
Expand All @@ -41,7 +42,7 @@ def export(location, options={})

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

Expand Down
1 change: 1 addition & 0 deletions spec/foreman/export/runit_spec.rb
Expand Up @@ -10,6 +10,7 @@

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')
Expand Down

0 comments on commit 9114063

Please sign in to comment.