#!/bin/bash # # Deploy an ikiwiki instance. # # Parameters NAME="$1" WEB_OWNER="$2" WEB_GROUP="$3" INSTANCE="ikiwiki" BASE="<%= scope.lookupvar('ikiwiki::sites_folder') %>" SITE=$BASE/$NAME CONF="/etc/ikiwiki" REPO_OWNER="<%= scope.lookupvar('ikiwiki::git_implementation') %>" REMOTE="$REPO_OWNER@localhost:$NAME" REPO="/var/git/repositories/$NAME.git" # Syntax check if [ -z "$INSTANCE" ]; then echo "Usage:`basename $0` " exit 1 elif [ ! -e "$CONF/$NAME.setup" ]; then echo "No config file for $NAME" exit 1 fi # Setup source folder mkdir -p $SITE/"$INSTANCE"_src/ $SITE/"$INSTANCE"_src_tmp/ # Create initial page if [ ! -e $SITE/"$INSTANCE"_src_tmp/index.mdwn ]; then echo > $SITE/"$INSTANCE"_src_tmp/index.mdwn <