aports/testing/novnc/alpine-specific-launch.js.patch
2020-08-01 15:15:40 +00:00

18 lines
549 B
Diff

--- a/utils/launch.sh
+++ b/utils/launch.sh
@@ -1,4 +1,4 @@
-#!/usr/bin/env bash
+#!/bin/sh
# Copyright (C) 2018 The noVNC Authors
# Licensed under MPL 2.0 or any later version (see LICENSE.txt)
@@ -165,7 +165,7 @@
${WEBSOCKIFY} ${SSLONLY} --web ${WEB} ${CERT:+--cert ${CERT}} ${KEY:+--key ${KEY}} ${PORT} ${VNC_DEST} ${RECORD_ARG} &
proxy_pid="$!"
sleep 1
-if ! ps -p ${proxy_pid} >/dev/null; then
+if [ -z "$proxy_pid" ] || ! ps -o pid= | grep -qw ${proxy_pid}; then
proxy_pid=
echo "Failed to start WebSockets proxy"
exit 1