summaryrefslogtreecommitdiff
path: root/libpiny/lib/Piny/Repo.pm
diff options
context:
space:
mode:
authorJoe Rayhawk <jrayhawk@omgwallhack.org>2014-03-16 21:22:00 -0700
committerJoe Rayhawk <jrayhawk@omgwallhack.org>2014-03-16 21:22:00 -0700
commit23e5fca9cb8f3ed34b7d31d5330088b650d45788 (patch)
tree3e90c311acf326a8be911ac9c45e123aef475c6a /libpiny/lib/Piny/Repo.pm
parent5532bcd9c3852203b8d2280b92e0a254eaf7b694 (diff)
parent74f36e7294764b136514b2ed67b9345fdc6e1e44 (diff)
downloadpiny-code-23e5fca9cb8f3ed34b7d31d5330088b650d45788.tar.gz
piny-code-23e5fca9cb8f3ed34b7d31d5330088b650d45788.zip
Merge remote-tracking branch 'origin/master'
Diffstat (limited to 'libpiny/lib/Piny/Repo.pm')
-rw-r--r--libpiny/lib/Piny/Repo.pm16
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 {