diff options
author | jrayhawk+piny.be@omgwallhack.org <jrayhawk+piny.be@omgwallhack.org> | 2013-04-12 19:46:04 -0700 |
---|---|---|
committer | jrayhawk+piny.be@omgwallhack.org <jrayhawk+piny.be@omgwallhack.org> | 2013-04-12 19:46:04 -0700 |
commit | cd440bfd3d6e20146e77e1d6c0e9f579687ca2ab (patch) | |
tree | 7020cf93a8c77d9da8fb92f3e1f59c75f67b39bc /libpiny | |
parent | 6d2f9a96f41cf1a3a80add728320c39f4932a319 (diff) | |
download | piny-code-cd440bfd3d6e20146e77e1d6c0e9f579687ca2ab.tar.gz piny-code-cd440bfd3d6e20146e77e1d6c0e9f579687ca2ab.zip |
libpiny: add piny.reloadapache configuration variable
Diffstat (limited to 'libpiny')
-rw-r--r-- | libpiny/lib/Piny/Config.pm | 1 | ||||
-rw-r--r-- | libpiny/lib/Piny/Repo.pm | 4 |
2 files changed, 4 insertions, 1 deletions
diff --git a/libpiny/lib/Piny/Config.pm b/libpiny/lib/Piny/Config.pm index ec86955..eb78a0f 100644 --- a/libpiny/lib/Piny/Config.pm +++ b/libpiny/lib/Piny/Config.pm @@ -265,6 +265,7 @@ tweakable "piny_ikiwikisrcdir" => "/srv/ikiwiki/", 'PathDir'; tweakable "piny_ikiwikiurl" => "http://piny.be/", 'HttpUrl'; tweakable "piny_ikiwikisecureurl" => "https://secure.piny.be/", 'HttpsUrl'; tweakable "piny_ikiwikisecurepath" => "/srv/www/secure.piny.be/", 'PathDir'; +tweakable "piny_reloadapache" => "true", 'GitBool'; tweakable "core_sharedrepository" => '0664', 'RepoPermission'; tweakable "receive_denynonfastforwards" => "true", 'GitBool'; tweakable "receive_denydeletes" => "true", 'GitBool'; diff --git a/libpiny/lib/Piny/Repo.pm b/libpiny/lib/Piny/Repo.pm index 41987c5..a735a16 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_reloadapache =~ /^(1|true)$/ ) { + system( "/etc/init.d/apache2", "reload" ) and die "Could not reload apache config!"; + }; }; sub rebuild_ikiwiki { |