Skip to content

Commit

Permalink
ensure mpm_event is disabled under debian 9 if mpm itk is used
Browse files Browse the repository at this point in the history
  • Loading branch information
zivis authored and punycode committed Aug 3, 2018
1 parent 56639c1 commit b22bdbb
Showing 1 changed file with 9 additions and 10 deletions.
19 changes: 9 additions & 10 deletions manifests/mpm.pp
Original file line number Diff line number Diff line change
Expand Up @@ -73,22 +73,21 @@
}
}

if $mpm == 'itk' and $::operatingsystem == 'Ubuntu' and $::operatingsystemrelease == '14.04' {
# workaround https://bugs.launchpad.net/ubuntu/+source/mpm-itk/+bug/1286882
exec {
'/usr/sbin/a2dismod mpm_event':
onlyif => '/usr/bin/test -e /etc/apache2/mods-enabled/mpm_event.load',
require => Package['httpd'],
before => Package['apache2-mpm-itk'],
}
}

if $mpm == 'itk' and ( ( $::operatingsystem == 'Ubuntu' and $::operatingsystemrelease == '16.04' ) or ( $::operatingsystem == 'Debian' and versioncmp($::operatingsystemrelease, '9.0.0') >= 0 ) ) {
$packagename = 'libapache2-mpm-itk'
} else {
$packagename = "apache2-mpm-${mpm}"
}

if $mpm == 'itk' and ( ( $::operatingsystem == 'Ubuntu' and $::operatingsystemrelease == '14.04' ) or ($::operatingsystem == 'Debian' and versioncmp($::operatingsystemrelease, '9.0.0') >= 0 ) ) {
# workaround https://bugs.launchpad.net/ubuntu/+source/mpm-itk/+bug/1286882
exec { '/usr/sbin/a2dismod mpm_event':
onlyif => '/usr/bin/test -e /etc/apache2/mods-enabled/mpm_event.load',
require => Package['httpd'],
before => Package[$packagename],
}
}

if versioncmp($apache_version, '2.4') < 0 or $mpm == 'itk' {
package { $packagename:
ensure => present,
Expand Down

0 comments on commit b22bdbb

Please sign in to comment.