Commit b2725b0d authored by Stefan Galinski's avatar Stefan Galinski 🎮
Browse files

[FEATURE] Xenial Compatibility

parent d02449e1
......@@ -6,6 +6,8 @@ description 'MailCatcher'
long_description 'MailCatcher'
version '1.0.0'
recipe 'mailcatcher::default', 'Main recipe'
issues_url 'https://gitlab.sgalinski.de/chef-cookbooks/mailcatcher/issues'
source_url 'https://gitlab.sgalinski.de/chef-cookbooks/mailcatcher'
depends 'apt'
depends 'build-essential'
\ No newline at end of file
......@@ -36,20 +36,25 @@ end
### Update Ruby ###
###################
apt_repository('ruby-ng') do
uri 'http://ppa.launchpad.net/brightbox/ruby-ng/ubuntu'
deb_src true
trusted true
keyserver 'keyserver.ubuntu.com'
key 'C3173AA6'
distribution 'trusty'
components [:main]
arch 'amd64,i386'
action :add
end
if node['platform_version'] == '16.04'
package 'ruby'
package 'ruby-dev'
else
apt_repository('ruby-ng') do
uri 'http://ppa.launchpad.net/brightbox/ruby-ng/ubuntu'
deb_src true
trusted true
keyserver 'keyserver.ubuntu.com'
key 'C3173AA6'
distribution 'trusty'
components [:main]
arch 'amd64,i386'
action :add
end
package 'ruby2.2', {:action => :upgrade}
package 'ruby2.2-dev', {:action => :upgrade}
package 'ruby2.2', {:action => :upgrade}
package 'ruby2.2-dev', {:action => :upgrade}
end
###########################
### Install mailcatcher ###
......@@ -81,16 +86,30 @@ end
### Integrate mailcatcher into PHP ###
######################################
replace_or_add 'change sendmail in the apache2 php configuration for mailcatcher' do
path '/etc/php5/apache2/php.ini'
pattern '.*sendmail_path =.*'
line 'sendmail_path = "/usr/bin/env catchmail"'
end
if node['platform_version'] == '16.04'
replace_or_add 'change sendmail in the apache2 php configuration for mailcatcher' do
path '/etc/php/7.0/fpm/php.ini'
pattern '.*sendmail_path =.*'
line 'sendmail_path = "/usr/bin/env catchmail"'
end
replace_or_add 'change sendmail in the apache2 php configuration for mailcatcher' do
path '/etc/php5/cli/php.ini'
pattern '.*sendmail_path =.*'
line 'sendmail_path = "/usr/bin/env catchmail"'
replace_or_add 'change sendmail in the apache2 php configuration for mailcatcher' do
path '/etc/php/7.0/cli/php.ini'
pattern '.*sendmail_path =.*'
line 'sendmail_path = "/usr/bin/env catchmail"'
end
else
replace_or_add 'change sendmail in the apache2 php configuration for mailcatcher' do
path '/etc/php5/apache2/php.ini'
pattern '.*sendmail_path =.*'
line 'sendmail_path = "/usr/bin/env catchmail"'
end
replace_or_add 'change sendmail in the apache2 php configuration for mailcatcher' do
path '/etc/php5/cli/php.ini'
pattern '.*sendmail_path =.*'
line 'sendmail_path = "/usr/bin/env catchmail"'
end
end
service 'apache2' do
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment