#!/bin/sh

if [ ! -d "$HOME/.peercast" ]; then
	mkdir "$HOME/.peercast" || exit 1
	ln -s "/usr/local/share/peercast/html" "/usr/local/libexec/peercast" "$HOME/.peercast" || exit 1
fi

cd "$HOME/.peercast" || exit 1
exec ./peercast "$@"
