thias / puppet-php

Puppet module to manage PHP
Other
49 stars 67 forks source link

notify fpm service if an .ini file changed or php module installed #41

Closed khaefeli closed 9 years ago

khaefeli commented 10 years ago

notify the fpm service => reload if there are changes to:

for example if you install the module "ldap" - this will now results in:

Notice: /Stage[main]/Website::Typo3/Php::Module[ldap]/Package[php5-ldap]/ensure: ensure changed 'purged' to 'present' Info: /Package[php5-ldap]: Scheduling refresh of Service[php5-fpm]

and the module is immediately loaded - otherwise you have to reload the fpm deamon manually (nobody wants that..)

scottsb commented 9 years ago

I believe this would be very worthwhile to merge, @thias.

mark0n commented 9 years ago

Looks good to me.

thias commented 9 years ago

Thanks! I don't really like defined(), since it's parse order dependent, which can lead to some "interesting" problems, but I can't think of any better solution...

thias commented 9 years ago

I'm performing some testing in preparation for the next release, and this change is actually quite broken!

The string is always defined, so all of those ifs are always true, so... everything breaks badly if you're not using FPM.

What you meant to have in the code was this :

if defined(Class['::php::fpm::daemon']) {

I'm fixing it now.