Skip to content

Commit

Permalink
[COOK-3769] Uncomment the enabling of apache modules and fix the `not…
Browse files Browse the repository at this point in the history
…_if` test

The `apache_module` should be able to enable modules
  • Loading branch information
nathenharvey committed Oct 8, 2013
1 parent 3e202cf commit cdbce5c
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions definitions/apache_module.rb
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,14 @@
end

if params[:enable]
# execute "a2enmod #{params[:name]}" do
# command "/usr/sbin/a2enmod #{params[:name]}"
# notifies :restart, 'service[apache2]'
# not_if do
# ::File.symlink?("#{node['apache']['dir']}/mods-enabled/#{params[:name]}.load") &&
# ::File.exists?("#{node['apache']['dir']}/mods-available/#{params[:name]}.conf") ? ::File.symlink?("#{node['apache']['dir']}/mods-enabled/#{params[:name]}.conf") : true
# end
# end
execute "a2enmod #{params[:name]}" do
command "/usr/sbin/a2enmod #{params[:name]}"
notifies :restart, 'service[apache2]'
not_if do
::File.symlink?("#{node['apache']['dir']}/mods-enabled/#{params[:name]}.load") &&
(::File.exists?("#{node['apache']['dir']}/mods-available/#{params[:name]}.conf") ? ::File.symlink?("#{node['apache']['dir']}/mods-enabled/#{params[:name]}.conf") : true)
end
end
else
execute "a2dismod #{params[:name]}" do
command "/usr/sbin/a2dismod #{params[:name]}"
Expand Down

0 comments on commit cdbce5c

Please sign in to comment.