| Index: modules/spawn_fcgi/manifests/init.pp |
| =================================================================== |
| --- a/modules/spawn_fcgi/manifests/init.pp |
| +++ b/modules/spawn_fcgi/manifests/init.pp |
| @@ -13,7 +13,10 @@ |
| ensure => running, |
| hasstatus => true, |
| enable => true, |
| - require => File['/etc/init.d/spawn-fcgi'], |
| + require => [ |
| + File['/etc/init.d/spawn-fcgi'], |
| + File['/etc/systemd/system/spawn-fcgi.service'], |
| + ], |
| } |
| file { '/etc/init.d/spawn-fcgi': |
| @@ -25,6 +28,29 @@ |
| require => Package['spawn-fcgi'], |
| } |
| + file { [ |
| + '/etc/systemd', |
| + '/etc/systemd/system', |
| + ]: |
| + ensure => 'directory', |
| + } |
| + |
| + # #2498: As systemd is not reliably enabling legacy sysvinit scripts, we |
| + # provide the # unit file (as generated by systemd when enabling the |
| + # service manually). This workaround can be considered for removal with |
| + # systemd 220, or when the package ships with its own systemd unit. |
| + file { '/etc/systemd/system/spawn-fcgi.service': |
| + ensure => present, |
| + owner => root, |
| + group => root, |
| + mode => '0755', |
| + source => 'puppet:///modules/spawn_fcgi/spawn-fcgi.service', |
| + require => [ |
| + File['/etc/systemd/system'], |
| + Package['spawn-fcgi'], |
| + ] |
| + } |
| + |
| file { '/etc/spawn-fcgi': |
| ensure => directory, |
| require => Package['spawn-fcgi'], |