aboutsummaryrefslogtreecommitdiff
path: root/templates/deploy.sh.erb
blob: 19aa514b1dd95ee6ff8518b7ec3e1444a5be8ff1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/bin/bash

NAME="$1"
BASE="<%= apache_sites_folder %>"
SITE=$BASE/$NAME
CONF="/etc/ikiwiki"

if [ -z "$NAME" ]; then
  echo "Usage:`basename $0` <site>"
fi

if [ ! -e "$CONF/$NAME" ]; then
  echo "No config file for $NAME"
fi

mkdir -p $SITE/ikiwiki_src/
echo > $SITE/ikiwiki_src/index.mdw <<EOF
Welcome to your new wiki.

All wikis are supposed to have a [[SandBox]], so this one does too.

----

This wiki is powered by [ikiwiki](http://ikiwiki.info).
EOF

ikiwiki-makerepo git $SITE/ikiwiki_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 --setup /etc/ikiwiki/$NAME.setup