#!/bin/sh
[ -s conf ] && . ./conf

: ${ROOTDIR:=/srv/www/lighttpd}
: ${LOGDIR:=/var/log/lighttpd}

if [ ! -d $ROOTDIR ]; then
	mkdir -p $ROOTDIR
	chown _lighttpd:_lighttpd $ROOTDIR
fi
if [ ! -d $LOGDIR ]; then
	mkdir -p $LOGDIR
	chown _lighttpd:_lighttpd $LOGDIR
fi

exec lighttpd-angel -D -f /etc/lighttpd/lighttpd.conf
