X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;f=modules%2Fapache2%2Fmanifests%2Fsite.pp;h=6d5ec55f3357ac59b442f573a9139dadb6e8b564;hb=f60ecdca84f93d2bd7f28e82022818f707b22a9d;hp=46ec1bf756faa69e319e5a35080bfc11b9c1a5f2;hpb=fd6f8a80b65c24ab3b6b9d5991d8dfafb265e66c;p=mirror%2Fdsa-puppet.git diff --git a/modules/apache2/manifests/site.pp b/modules/apache2/manifests/site.pp index 46ec1bf75..6d5ec55f3 100644 --- a/modules/apache2/manifests/site.pp +++ b/modules/apache2/manifests/site.pp @@ -35,25 +35,25 @@ define apache2::site ( ensure => $ensure, content => $content, require => Package['apache2'], - notify => Service['apache2'], + notify => Exec['service apache2 reload'], } } else { file { $target: ensure => $ensure, source => $source, require => Package['apache2'], - notify => Service['apache2'], + notify => Exec['service apache2 reload'], } } - if $::lsbmajdistrelease <= 7 { + if versioncmp($::lsbmajdistrelease, '7') <= 0 { $symlink = "/etc/apache2/sites-enabled/${name}" } else { $symlink = "/etc/apache2/sites-enabled/${name}.conf" file { "/etc/apache2/sites-enabled/${name}": ensure => absent, - notify => Service['apache2'], + notify => Exec['service apache2 reload'], } } @@ -61,12 +61,12 @@ define apache2::site ( file { $symlink: ensure => link, target => $link_target, - notify => Service['apache2'], + notify => Exec['service apache2 reload'], } } else { file { $symlink: ensure => absent, - notify => Service['apache2'], + notify => Exec['service apache2 reload'], } } }