Skip to content

Commit

Permalink
Fix enable extension when there is no module associated
Browse files Browse the repository at this point in the history
When the extension has no module associated (e.g. with net-curl), the
module always run phpenmod command (because phpquery always report that
the module is not matched).
This commit tries to fix this problem
  • Loading branch information
amateo committed Sep 25, 2018
1 parent 781b427 commit 725f6cd
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions manifests/extension/config.pp
Original file line number Diff line number Diff line change
Expand Up @@ -108,13 +108,15 @@
'ALL' => 'cli',
default => $sapi,
}
exec { $cmd:
onlyif => "${ext_tool_query} -s ${_sapi} -m ${so_name} | /bin/grep 'No module matches ${so_name}'",
require => ::Php::Config[$title],
}
if has_key($final_settings, 'extension') and $final_settings[extension] {
exec { $cmd:
onlyif => "${ext_tool_query} -s ${_sapi} -m ${so_name} | /bin/grep 'No module matches ${so_name}'",
require => ::Php::Config[$title],
}

if $php::fpm {
Package[$php::fpm::package] ~> Exec[$cmd]
if $php::fpm {
Package[$php::fpm::package] ~> Exec[$cmd]
}
}
}
}

0 comments on commit 725f6cd

Please sign in to comment.