utils/launch.sh: find top web dir (with vnc.html).

This commit is contained in:
Joel Martin 2010-12-21 10:17:43 -06:00
parent b992f7c7dd
commit 0f7f146f20
1 changed files with 12 additions and 0 deletions

View File

@ -73,6 +73,18 @@ netstat -ltn | grep -qs "${PROXY_PORT}.*LISTEN" \
trap "cleanup" TERM QUIT INT EXIT
# Find vnc.html
if [ -e "$(pwd)/vnc.html" ]; then
TOP=$(pwd)
elif [ -e "${HERE}/../vnc.html" ]; then
TOP=${HERE}/../
elif [ -e "${HERE}/vnc.html" ]; then
TOP=${HERE}
else
die "Could not find vnc.html"
fi
cd ${TOP}
echo "Starting webserver on port ${WEB_PORT}"
${HERE}/web.py ${WEB_PORT} >/dev/null &
web_pid="$!"