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>"
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.
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