diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2013-06-28 14:01:35 -0300 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2013-06-28 14:01:35 -0300 |
commit | 228427cd2109fd711f19f2714d9d7e3c44826143 (patch) | |
tree | 782c22e0f398a412ef9578fc4a15523a5608a874 /templates | |
parent | 3a9686cb91a72e33b94d606d1453d78e01c60bda (diff) | |
download | puppet-pmwiki-228427cd2109fd711f19f2714d9d7e3c44826143.tar.gz puppet-pmwiki-228427cd2109fd711f19f2714d9d7e3c44826143.tar.bz2 |
Minor install refactor
Diffstat (limited to 'templates')
-rw-r--r-- | templates/pmwiki.sh.erb | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/templates/pmwiki.sh.erb b/templates/pmwiki.sh.erb index 20cebf0..789f6cb 100644 --- a/templates/pmwiki.sh.erb +++ b/templates/pmwiki.sh.erb @@ -108,9 +108,20 @@ function pmwiki_install { exit 1 fi - mkdir -p $SITES/$site/wiki + # Create folder structure + ( + mkdir -p $SITES/$site/wiki + cd $SITES/$site/wiki + ln -s field.php index.php + mkdir -p local uploads wiki.d cookbook + chown $site. wiki.d + chown root.$site local/config.php + ) + + # Setup dispatcher echo '<?php include("/var/www/data/wiki/pmwiki.php"); ?>' > $SITES/$site/wiki/field.php + # Setup redirections echo > $SITES/$site/wiki/.htaccess <<-EOF Options +FollowSymLinks RewriteEngine on @@ -118,20 +129,13 @@ RewriteRule ^/?$ https://$site.<%= domain %>/Main/HomePage [R=permanent,QSA,L] RewriteRule ^([^/a-z].*) field.php?n=$1 [QSA,L] EOF + # Setup config file echo > $SITES/$site/wiki/local/config.php <<-EOF <?php if (!defined('PmWiki')) exit(); $ScriptUrl = "https://$site.<%= domain %>"; $EnablePathInfo = 1; EOF - - ( - cd $SITES/$site/wiki - ln -s field.php index.php - mkdir -p local uploads wiki.d cookbook - chown $site. wiki.d - chown root.$site local/config.php - ) } # Main procedure |