diff options
-rwxr-xr-x | localikiwikicreatesite | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/localikiwikicreatesite b/localikiwikicreatesite new file mode 100755 index 0000000..9ab367e --- /dev/null +++ b/localikiwikicreatesite @@ -0,0 +1,22 @@ +#!/bin/sh + +# Origin: http://ikiwiki.info/setup/ + +set -e + +host=$1 +[ -z "$host" ] && echo "ERROR: Hostname must be supplied!" && exit 1 + +SRCDIR=~/private_webdata/"$host"/content +DESTDIR=~/public_websites/"$host" + +mkdir -p $SRCDIR +cat <<EOF >$SRCDIR/index.mdwn +Welcome to your new wiki. +All wikis are supposed to have a <a href="../sandbox/">SandBox</a>, +so this one does too. +---- +This wiki is powered by [ikiwiki](http://ikiwiki.info). +EOF + +ikiwiki --verbose $SRCDIR $DESTDIR --url=http://"$host" |