dev/provisioning/modules/apache/manifests/mod/cgid.pp
changeset 28 b0b56e0f8c7f
equal deleted inserted replaced
27:a2342f26c9de 28:b0b56e0f8c7f
       
     1 class apache::mod::cgid {
       
     2   case $::osfamily {
       
     3     'FreeBSD': {}
       
     4     default: {
       
     5       if defined(Class['::apache::mod::event']) {
       
     6         Class['::apache::mod::event'] -> Class['::apache::mod::cgid']
       
     7       } else {
       
     8         Class['::apache::mod::worker'] -> Class['::apache::mod::cgid']
       
     9       }
       
    10     }
       
    11   }
       
    12 
       
    13   # Debian specifies it's cgid sock path, but RedHat uses the default value
       
    14   # with no config file
       
    15   $cgisock_path = $::osfamily ? {
       
    16     'debian'  => "\${APACHE_RUN_DIR}/cgisock",
       
    17     'freebsd' => 'cgisock',
       
    18     default   => undef,
       
    19   }
       
    20   ::apache::mod { 'cgid': }
       
    21   if $cgisock_path {
       
    22     # Template uses $cgisock_path
       
    23     file { 'cgid.conf':
       
    24       ensure  => file,
       
    25       path    => "${::apache::mod_dir}/cgid.conf",
       
    26       content => template('apache/mod/cgid.conf.erb'),
       
    27       require => Exec["mkdir ${::apache::mod_dir}"],
       
    28       before  => File[$::apache::mod_dir],
       
    29       notify  => Class['apache::service'],
       
    30     }
       
    31   }
       
    32 }