Skip to content

Commit

Permalink
(MODULES-6677) make sure event mpm is disabled
Browse files Browse the repository at this point in the history
Currently, on Debian 9 specifically, the event mod may be enabled when trying to use a different mpm. This ensures event is disabled if another mpm is chosen. Also closes puppetlabs#1766
  • Loading branch information
eputnam committed Mar 2, 2018
1 parent bfad6fa commit 654a496
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion manifests/mpm.pp
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,20 @@
$packagename = "apache2-mpm-${mpm}"
}

$mod_enabled_dir = $::apache::mod_enable_dir

if $mpm == 'prefork' and ( $::operatingsystem == 'Debian' and versioncmp($::operatingsystemrelease, '9.0.0') >= 0 ) {
exec { '/usr/sbin/a2dismod mpm_event':
onlyif => "/usr/bin/test -e ${mod_enabled_dir}/mpm_event.load",
require => Package['httpd'],
before => Package[$packagename],
}
}

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',
onlyif => "/usr/bin/test -e ${mod_enabled_dir}/mpm_event.load",
require => Package['httpd'],
before => Package[$packagename],
}
Expand Down

0 comments on commit 654a496

Please sign in to comment.