@@ -99,7 +99,7 @@ while [ "$*" ]; do
99
99
--syslog) SYSLOG_ARG=" --syslog ${OPTARG} " ; shift ;;
100
100
--heartbeat) HEARTBEAT_ARG=" --heartbeat ${OPTARG} " ; shift ;;
101
101
--idle-timeout) IDLETIMEOUT_ARG=" --idle-timeout ${OPTARG} " ; shift ;;
102
- --timeout) TIMEOUT_ARG=" --timeout ${OPTARG} " ; shift ;;
102
+ --timeout) TIMEOUT_ARG=" ${OPTARG} " ; shift ;;
103
103
--web-auth) WEBAUTH_ARG=" --web-auth" ;;
104
104
--auth-plugin) AUTHPLUGIN_ARG=" --auth-plugin ${OPTARG} " ; shift ;;
105
105
--auth-source) AUTHSOURCE_ARG=" --auth-source ${OPTARG} " ; shift ;;
@@ -138,11 +138,11 @@ if [ -n "${WEB}" ]; then
138
138
elif [ -e " $( pwd) /vnc.html" ]; then
139
139
WEB=$( pwd)
140
140
elif [ -e " ${HERE} /../vnc.html" ]; then
141
- WEB=${HERE} /../
141
+ WEB=" ${HERE} /../"
142
142
elif [ -e " ${HERE} /vnc.html" ]; then
143
- WEB=${HERE}
143
+ WEB=" ${HERE} "
144
144
elif [ -e " ${HERE} /../share/novnc/vnc.html" ]; then
145
- WEB=${HERE} /../share/novnc/
145
+ WEB=" ${HERE} /../share/novnc/"
146
146
else
147
147
die " Could not find vnc.html"
148
148
fi
@@ -170,11 +170,11 @@ if [ -n "${KEY}" ]; then
170
170
fi
171
171
172
172
# try to find websockify (prefer local, try global, then download local)
173
- if [[ -d ${HERE} /websockify ]]; then
174
- WEBSOCKIFY=${HERE} /websockify/run
173
+ if [[ -d " ${HERE} /websockify" ]]; then
174
+ WEBSOCKIFY=" ${HERE} /websockify/run" \
175
175
176
176
if [[ ! -x $WEBSOCKIFY ]]; then
177
- echo " The path ${HERE} /websockify exists, but $WEBSOCKIFY either does not exist or is not executable."
177
+ echo " The path " ${HERE} /websockify exists, but $WEBSOCKIFY either does not exist or is not executable."
178
178
echo " If you intended to use an installed websockify package, please remove ${HERE} /websockify."
179
179
exit 1
180
180
fi
@@ -209,7 +209,7 @@ WEB=`realpath "${WEB}"`
209
209
[ -n " ${RECORD} " ] && RECORD=` realpath " ${RECORD} " `
210
210
211
211
echo " Starting webserver and WebSockets proxy on${HOST: + host ${HOST} } port ${PORT} "
212
- ${WEBSOCKIFY} ${SYSLOG_ARG} ${SSLONLY} ${FILEONLY_ARG} --web ${WEB} ${CERT: +--cert ${CERT} } ${KEY: +--key ${KEY} } ${LISTEN} ${VNC_DEST} ${HEARTBEAT_ARG} ${IDLETIMEOUT_ARG} ${RECORD: +--record ${RECORD} } ${TIMEOUT_ARG} ${WEBAUTH_ARG} ${AUTHPLUGIN_ARG} ${AUTHSOURCE_ARG} &
212
+ " ${WEBSOCKIFY} " ${SYSLOG_ARG: +--syslog " ${SYSLOG_ARG} " } ${SSLONLY} ${FILEONLY_ARG} --web ${WEB} ${CERT: +--cert " ${CERT} " } ${KEY: +--key " ${KEY} " } " ${LISTEN} " " ${VNC_DEST} " ${HEARTBEAT_ARG} ${IDLETIMEOUT_ARG} ${RECORD: +--record " ${RECORD} " } ${TIMEOUT_ARG: +--timeout " ${TIMEOUT_ARG} " } ${WEBAUTH_ARG} ${AUTHPLUGIN_ARG} ${AUTHSOURCE_ARG} &
213
213
proxy_pid=" $! "
214
214
sleep 1
215
215
if [ -z " $proxy_pid " ] || ! ps -eo pid= | grep -w " $proxy_pid " > /dev/null; then
@@ -219,7 +219,7 @@ if [ -z "$proxy_pid" ] || ! ps -eo pid= | grep -w "$proxy_pid" > /dev/null; then
219
219
fi
220
220
221
221
if [ -z " $HOST " ]; then
222
- HOST=$( hostname)
222
+ HOST=" $( hostname) "
223
223
fi
224
224
225
225
echo -e " \n\n Navigate to this URL:\n "
0 commit comments