aboutsummaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
Diffstat (limited to 'templates')
-rw-r--r--templates/deploy.sh.erb15
1 files changed, 9 insertions, 6 deletions
diff --git a/templates/deploy.sh.erb b/templates/deploy.sh.erb
index 69785d0..5386729 100644
--- a/templates/deploy.sh.erb
+++ b/templates/deploy.sh.erb
@@ -6,7 +6,9 @@ BASE="<%= apache_sites_folder %>"
SITE=$BASE/$NAME
CONF="/etc/ikiwiki"
OWNER="gitosis"
-GROUP="gitosis"
+WEB_GROUP="www-data"
+REPO_GROUP="gitosis"
+REPO="/var/git/repositories/$NAME.git"
if [ -z "$INSTANCE" ]; then
echo "Usage:`basename $0` <site> <instance>"
@@ -20,7 +22,7 @@ fi
mkdir -p $SITE/"$INSTANCE"_src/
# Create initial page
-echo > $SITE/"$INSTANCE"_src/index.mdw <<EOF
+echo > $SITE/"$INSTANCE"_src/index.mdwn <<EOF
Welcome to your new wiki.
All wikis are supposed to have a [[SandBox]], so this one does too.
@@ -31,10 +33,11 @@ This wiki is powered by [ikiwiki](http://ikiwiki.info).
EOF
# Create ikiwiki instance
-ikiwiki-makerepo git $SITE/"$INSTANCE"_src/ /var/git/repositories/$NAME.git
-touch /var/git/repositories/$NAME.git/git-daemon-export-ok
-( cd /var/git/repositories/$NAME.git && git --bare update-server-info )
+ikiwiki-makerepo git $SITE/"$INSTANCE"_src/ $REPO
+touch $REPO/git-daemon-export-ok
+( cd $REPO/$NAME.git && git --bare update-server-info )
ikiwiki --setup /etc/ikiwiki/$NAME.setup
# Set permissions
-chown -R $OWNER.$GROUP $SITE/"$INSTANCE"_src $SITE/$INSTANCE /var/git/repositories/$NAME.git
+chown -R $OWNER.$WEB_GROUP $SITE/"$INSTANCE"_src $SITE/$INSTANCE
+chown -R $OWNER.$REPO_GROUP $REPO