Skip to content

Commit

Permalink
check for nohttpd option before using it with vncserver (#767)
Browse files Browse the repository at this point in the history
check for nohttpd option before using it with vncserver
  • Loading branch information
johrstrom authored Jul 21, 2022
1 parent d82ad0a commit 4ae02fb
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lib/ood_core/batch_connect/templates/vnc.rb
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,13 @@ def before_script
# Clean up any old VNC sessions that weren't cleaned before
#{vnc_clean}
# for turbovnc 3.0 compatability.
if timeout 2 vncserver --help 2>&1 | grep 'nohttpd' >/dev/null 2>&1; then
HTTPD_OPT='-nohttpd'
fi
# Attempt to start VNC server
VNC_OUT=$(vncserver -log "#{vnc_log}" -rfbauth "#{vnc_passwd}" -nohttpd -noxstartup #{vnc_args} 2>&1)
VNC_OUT=$(vncserver -log "#{vnc_log}" -rfbauth "#{vnc_passwd}" $HTTPD_OPT -noxstartup #{vnc_args} 2>&1)
VNC_PID=$(pgrep -s 0 Xvnc) # the script above will daemonize the Xvnc process
echo "${VNC_OUT}"
Expand Down

0 comments on commit 4ae02fb

Please sign in to comment.