summaryrefslogtreecommitdiff
path: root/puppet/modules/site_apache/manifests/common/autorestart.pp
blob: 6d8c4c3a52543d8f6100a97715652b7e491f8c5a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#
# 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',
  }

  ::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'],
    ]
  }
}