]> git.proxmox.com Git - mirror_novnc.git/commitdiff
utils/launch.sh: find top web dir (with vnc.html).
authorJoel Martin <github@martintribe.org>
Tue, 21 Dec 2010 16:17:43 +0000 (10:17 -0600)
committerJoel Martin <github@martintribe.org>
Tue, 21 Dec 2010 16:17:43 +0000 (10:17 -0600)
utils/launch.sh

index aeb875c82c714b13235be4ea0bc00bb7b450fb3e..1ee7d15b502f2485d52bdb79754f5940803c669c 100755 (executable)
@@ -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="$!"