summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormh <mh@immerda.ch>2010-01-09 15:59:20 +0100
committermh <mh@immerda.ch>2010-01-09 15:59:20 +0100
commit3088c95a0dee321c7793ee723aa8de3e556afdbb (patch)
treede7d9e357da881590a2fc2db2b511f9c66299182
parent71f70700b7e30d4fb251027918be8e0070f98852 (diff)
only manage the files if they are present
-rw-r--r--manifests/web/repo/lighttpd.pp20
1 files changed, 13 insertions, 7 deletions
diff --git a/manifests/web/repo/lighttpd.pp b/manifests/web/repo/lighttpd.pp
index b7ba9fd..6676c4d 100644
--- a/manifests/web/repo/lighttpd.pp
+++ b/manifests/web/repo/lighttpd.pp
@@ -5,11 +5,6 @@ define git::web::repo::lighttpd(
){
if $ensure == 'present' { include git::web::lighttpd }
file{"/etc/lighttpd/gitweb.d/${name}.conf": }
- if defined(Service['lighttpd']) {
- File["/etc/lighttpd/gitweb.d/${name}.conf"]{
- notify => Service['lighttpd'],
- }
- }
if $ensure == 'present' {
File["/etc/lighttpd/gitweb.d/${name}.conf"]{
content => template("git/web/lighttpd"),
@@ -24,7 +19,18 @@ define git::web::repo::lighttpd(
ensure => $ensure,
line => "include \"gitweb.d/${name}.conf\"",
file => "/etc/lighttpd/lighttpd-gitweb.conf",
- require => File['/etc/lighttpd/lighttpd-gitweb.conf'],
- notify => Service['lighttpd'],
+ }
+ if defined(Service['lighttpd']) {
+ File["/etc/lighttpd/gitweb.d/${name}.conf"]{
+ notify => Service['lighttpd'],
+ }
+ Line["include_of_gitwebrepo_${name}"]{
+ notify => Service['lighttpd'],
+ }
+ }
+ if defined(File['/etc/lighttpd/lighttpd-gitweb.conf']){
+ Line["include_of_gitwebrepo_${name}"]{
+ require => File['/etc/lighttpd/lighttpd-gitweb.conf'],
+ }
}
}