diff options
Diffstat (limited to 'libpiny/lib/Piny/Repo.pm')
-rw-r--r-- | libpiny/lib/Piny/Repo.pm | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/libpiny/lib/Piny/Repo.pm b/libpiny/lib/Piny/Repo.pm index ba1ee09..ffdd9fb 100644 --- a/libpiny/lib/Piny/Repo.pm +++ b/libpiny/lib/Piny/Repo.pm @@ -330,7 +330,9 @@ sub rebuild_apache { $wwwtemp->close or die "Could not close new wikilist: $!"; rename( $wwwtemp->filename, "/etc/apache2/piny/www/" . $s->name ) or die "Could not rename apache config: $!"; - system( "/etc/init.d/apache2", "reload" ) and die "Could not reload apache config!"; + if ( $s->config->piny_apachereload =~ /^(1|true)$/ ) { + system( "/etc/init.d/apache2", "reload" ) and die "Could not reload apache config!"; + }; }; sub rebuild_ikiwiki { @@ -415,7 +417,9 @@ sub destroy_apache { }; }; - system( "/etc/init.d/apache2", "reload" ) and die "Could not reload apache config!"; + if ( $s->config->piny_apachereload =~ /^(1|true)$/ ) { + system( "/etc/init.d/apache2", "reload" ) and die "Could not reload apache config!"; + }; }; sub destroy_ikiwiki { @@ -464,7 +468,9 @@ sub _change_owner { sub all_repos { my ( $class, $dir ) = @_; - $dir = $s->config->piny_gitpath unless defined $dir; + my $config = Piny::Config->new( ); + + $dir = $config->piny_gitpath unless defined $dir; my @ret; @@ -577,7 +583,9 @@ sub _build_group { sub _build_path { my ( $s ) = @_; - return $s->config->piny_gitpath . $s->name . ".git"; + my $config = Piny::Config->new( ); # New, otherwise we'd wind up recursing. It's considered global anyway. + + return $config->piny_gitpath . "/" . $s->name . ".git"; }; sub _build_description { |