diff options
Diffstat (limited to 'puppet/modules/site_apache/manifests/common/autorestart.pp')
-rw-r--r-- | puppet/modules/site_apache/manifests/common/autorestart.pp | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/puppet/modules/site_apache/manifests/common/autorestart.pp b/puppet/modules/site_apache/manifests/common/autorestart.pp new file mode 100644 index 00000000..8b7b590d --- /dev/null +++ b/puppet/modules/site_apache/manifests/common/autorestart.pp @@ -0,0 +1,30 @@ +# +# Adds autorestart extension to apache on crash +# +class site_apache::common::autorestart { + + file { + '/etc/systemd/system/apache2.service.d': + ensure => directory, + owner => 'root', + group => 'root', + mode => '0755'; + + # Add .placeholder file so directory doesn't get removed by + # deb-systemd-helper in a package removal postrm, see + # issue #8841 for more details. + '/etc/systemd/system/apache2.service.d/.placeholder': + ensure => file, + owner => 'root', + group => 'root', + mode => '0755'; + } + + ::systemd::unit_file { 'apache2.service.d/autorestart.conf': + source => 'puppet:///modules/site_apache/autorestart.conf', + require => [ + File['/etc/systemd/system/apache2.service.d'], + Service['apache'], + ] + } +} |