#!/bin/sh

PATH="/usr/local/sbin:/usr/local/bin:/bin:/sbin:/usr/bin:/usr/sbin"
export PATH

. need_root

echo -n "oddmuse"

. which_user  # sets $user and $home, will exit if borked
. user_info   # sets other variables

dir="/var/wiki/$user"
mkdir "$dir"
ln -s /usr/local/lib/oddmuse/modules "$dir"
chown "$user" "$dir"
chgrp www-data "$dir"
chmod g+rwx "$dir"

echo " (wiki)."
