Skip to content

Commit

Permalink
Apache2 with fewer boot time hacks
Browse files Browse the repository at this point in the history
  • Loading branch information
leehambley committed Jun 11, 2013
1 parent c87e00e commit 0befe40
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions apache2.rb
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,14 @@ def disable_mod(mod)

dep 'apache2', :template => 'managed' do
installs %w[apache2 apache2-mpm-prefork]
before do
log_shell("Writing error policy to policy-rc.d", "echo \"#!/bin/sh\nexit 101\" | sudo tee /usr/sbin/policy-rc.d", sudo: true)
log_shell("Making the script executable", "chmod +x /usr/sbin/policy-rc.d", sudo: true)
end
after do
log_shell("Removing error policy from policy-rc.d", "unlink /usr/sbin/policy-rc.d", sudo: true)
log_shell("Removing from rc.d:", "update-rc.d -f apache2 remove", sudo: true)
end
end

dep 'apache2 dev packages', :template => 'managed' do
Expand Down

0 comments on commit 0befe40

Please sign in to comment.