Fix unrecognized option "p" in busybox ps

This commit is contained in:
nggit 2022-11-07 21:25:50 +07:00
parent 081f9d2a13
commit 2dd5600f3d
1 changed files with 1 additions and 1 deletions

View File

@ -193,7 +193,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} ${WEBAUTH_ARG} ${AUTHPLUGIN_ARG} ${AUTHSOURCE_ARG} &
proxy_pid="$!"
sleep 1
if ! ps -p ${proxy_pid} >/dev/null; then
if [ -z "$proxy_pid" ] || ! ps -eo pid= | grep -w "$proxy_pid" > /dev/null; then
proxy_pid=
echo "Failed to start WebSockets proxy"
exit 1