Skip to content
This repository has been archived by the owner on Jan 10, 2023. It is now read-only.

Commit

Permalink
Merge pull request #150 from linc01n/support-apache2-listen-ports-cha…
Browse files Browse the repository at this point in the history
…nges

Support multiple apache2 versions
  • Loading branch information
linc01n committed Apr 25, 2016
2 parents 27034b7 + f5d2f00 commit 8c03a9d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
2 changes: 1 addition & 1 deletion metadata.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
supports 'scientific'
supports 'ubuntu'

depends 'apache2', '>= 3.2.0'
depends 'apache2'
depends 'ark'
depends 'cron'
depends 'database'
Expand Down
13 changes: 9 additions & 4 deletions recipes/apache2.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
node.default['apache']['listen'] |= [
"*:#{node['stash']['apache2']['port']}",
"*:#{node['stash']['apache2']['ssl']['port']}"
]
begin
node.set['apache']['listen_ports'] = node['apache']['listen_ports'] + [node['stash']['apache2']['port']] unless node['apache']['listen_ports'].include?(node['stash']['apache2']['port'])
node.set['apache']['listen_ports'] = node['apache']['listen_ports'] + [node['stash']['apache2']['ssl']['port']] unless node['apache']['listen_ports'].include?(node['stash']['apache2']['ssl']['port'])
rescue NoMethodError
node.default['apache']['listen'] |= [
"*:#{node['stash']['apache2']['port']}",
"*:#{node['stash']['apache2']['ssl']['port']}"
]
end

include_recipe 'apache2'
include_recipe 'apache2::mod_proxy'
Expand Down

0 comments on commit 8c03a9d

Please sign in to comment.