diff --git a/utils/novnc_proxy b/utils/novnc_proxy index 0900f7e..6229dc1 100755 --- a/utils/novnc_proxy +++ b/utils/novnc_proxy @@ -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) @@ -180,7 +180,7 @@ echo "Starting webserver and WebSockets proxy on port ${PORT}" ${WEBSOCKIFY} ${SYSLOG_ARG} ${SSLONLY} --web ${WEB} ${CERT:+--cert ${CERT}} ${KEY:+--key ${KEY}} ${PORT} ${VNC_DEST} ${HEARTBEAT_ARG} ${IDLETIMEOUT_ARG} ${RECORD_ARG} ${TIMEOUT_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