aboutsummaryrefslogtreecommitdiffstats
path: root/testing/novnc/alpine-specific-launch.js.patch
diff options
context:
space:
mode:
authorJakub Jirutka <jakub@jirutka.cz>2017-07-29 00:17:54 +0200
committerJakub Jirutka <jakub@jirutka.cz>2017-07-29 00:28:10 +0200
commit142ce5e987d177a180fcedc26ce2e11c039349f4 (patch)
tree83a6028267ba6fda31fb606aae2ecb121fcaa0bc /testing/novnc/alpine-specific-launch.js.patch
parent7004919ed9970e5b3c93f370dbba9104ca5d6ba4 (diff)
downloadaports-142ce5e987d177a180fcedc26ce2e11c039349f4.tar.bz2
aports-142ce5e987d177a180fcedc26ce2e11c039349f4.tar.xz
testing/novnc: improve abuild and fix launch script
Diffstat (limited to 'testing/novnc/alpine-specific-launch.js.patch')
-rw-r--r--testing/novnc/alpine-specific-launch.js.patch51
1 files changed, 49 insertions, 2 deletions
diff --git a/testing/novnc/alpine-specific-launch.js.patch b/testing/novnc/alpine-specific-launch.js.patch
index ca1c985188..0228469d04 100644
--- a/testing/novnc/alpine-specific-launch.js.patch
+++ b/testing/novnc/alpine-specific-launch.js.patch
@@ -6,8 +6,55 @@
# Copyright 2016 Joel Martin
# Copyright 2016 Solly Ross
-@@ -141,7 +141,7 @@
- ${WEBSOCKIFY} --web ${WEB} ${CERT:+--cert ${CERT}} ${PORT} ${VNC_DEST} &
+@@ -25,8 +25,8 @@
+ exit 2
+ }
+
+-NAME="$(basename $0)"
+-REAL_NAME="$(readlink -f $0)"
++NAME="$(basename "$0")"
++REAL_NAME="$(readlink -f "$0")"
+ HERE="$(cd "$(dirname "$REAL_NAME")" && pwd)"
+ PORT="6080"
+ VNC_DEST="localhost:5900"
+@@ -106,42 +106,11 @@
+ echo "Warning: could not find self.pem"
+ fi
+
+-# try to find websockify (prefer local, try global, then download local)
+-if [[ -e ${HERE}/websockify ]]; then
+- WEBSOCKIFY=${HERE}/websockify/run
+-
+- if [[ ! -x $WEBSOCKIFY ]]; then
+- echo "The path ${HERE}/websockify exists, but $WEBSOCKIFY either does not exist or is not executable."
+- echo "If you intended to use an installed websockify package, please remove ${HERE}/websockify."
+- exit 1
+- fi
+-
+- echo "Using local websockify at $WEBSOCKIFY"
+-else
+- WEBSOCKIFY=$(which websockify 2>/dev/null)
+-
+- if [[ $? -ne 0 ]]; then
+- echo "No installed websockify, attempting to clone websockify..."
+- WEBSOCKIFY=${HERE}/websockify/run
+- git clone https://github.com/kanaka/websockify ${HERE}/websockify
+-
+- if [[ ! -e $WEBSOCKIFY ]]; then
+- echo "Unable to locate ${HERE}/websockify/run after downloading"
+- exit 1
+- fi
+-
+- echo "Using local websockify at $WEBSOCKIFY"
+- else
+- echo "Using installed websockify at $WEBSOCKIFY"
+- fi
+-fi
+-
+ echo "Starting webserver and WebSockets proxy on port ${PORT}"
+-#${HERE}/websockify --web ${WEB} ${CERT:+--cert ${CERT}} ${PORT} ${VNC_DEST} &
+-${WEBSOCKIFY} --web ${WEB} ${CERT:+--cert ${CERT}} ${PORT} ${VNC_DEST} &
++websockify --web ${WEB} ${CERT:+--cert ${CERT}} ${PORT} ${VNC_DEST} &
proxy_pid="$!"
sleep 1
-if ! ps -p ${proxy_pid} >/dev/null; then