X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;f=modules%2Fapache2%2Fmanifests%2Fsite.pp;h=6d5ec55f3357ac59b442f573a9139dadb6e8b564;hb=dd4cdc49e342f3525406d80480b56d7e4424d079;hp=9ab7635159c0d02f089d349b88017910df73ccb9;hpb=5b9ac527598f1f41caaeec5a6e31376738c0508f;p=mirror%2Fdsa-puppet.git diff --git a/modules/apache2/manifests/site.pp b/modules/apache2/manifests/site.pp index 9ab763515..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 { - $symlink = "/etc/apache2/sites-enabled/${name}": + if versioncmp($::lsbmajdistrelease, '7') <= 0 { + $symlink = "/etc/apache2/sites-enabled/${name}" } else { - $symlink = "/etc/apache2/sites-enabled/${name}.conf": + $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'], } } }