Skip to content

Commit

Permalink
Merge pull request voxpupuli#117 from mayflower/fix/php-fpm-reload
Browse files Browse the repository at this point in the history
Create upstart service override before installing php-fpm
  • Loading branch information
globin committed Sep 11, 2015
2 parents cda4699 + 4222a11 commit f0654d7
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 14 deletions.
10 changes: 10 additions & 0 deletions manifests/fpm.pp
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,14 @@

$real_pools = hiera_hash('php::fpm::pools', $pools)
create_resources(::php::fpm::pool, $real_pools)

# Create an override to use a reload signal as trusty and utopic's
# upstart version supports this:q
if $::osfamily == 'Debian' and
($::lsbdistcodename == 'trusty' or $::lsbdistcodename == 'utopic') {
file { "/etc/init/${::php::fpm::service::service_name}.override":
content => 'reload signal USR2',
before => Package[$real_package],
}
}
}
17 changes: 3 additions & 14 deletions manifests/fpm/service.pp
Original file line number Diff line number Diff line change
Expand Up @@ -26,20 +26,9 @@
if $::osfamily == 'Debian' {
# Precise upstart doesn't support reload signals, so use
# regular service restart instead
if $::lsbdistcodename == 'precise' {
$restart = undef
} else {
$restart = $reload
}

# Create an override to use a reload signal as trusty and utopic's
# upstart version supports this
if ($::lsbdistcodename == 'trusty' or
$::lsbdistcodename == 'utopic') {
file { "/etc/init/${service_name}.override":
content => 'reload signal USR2',
before => Service[$service_name],
}
$restart = $::lsbdistcodename ? {
'precise' => undef,
default => $reload
}
} else {
$restart = $reload
Expand Down

0 comments on commit f0654d7

Please sign in to comment.