Skip to content
Snippets Groups Projects
Commit 38531354 authored by Mathis Rosenhauer's avatar Mathis Rosenhauer
Browse files

start-vnc: robustness

parent 7305b84d
No related branches found
No related tags found
No related merge requests found
......@@ -121,7 +121,7 @@ clean_up () {
trap - ERR EXIT
set +e
if ${SVNC_KILLSERVER}; then
if [[ "${SVNC_KILLSERVER}" = true ]]; then
if [[ -n ${vnc_host:-} ]]; then
echo "Killing vncserver :${vnc_display} on ${vnc_host}."
ssh_frontend "ssh ${vnc_host} \"/opt/TurboVNC/bin/vncserver \
......@@ -144,7 +144,7 @@ clean_up () {
rmdir "${ssh_socket_dir}"
# Remove local vnc PasswordFile
if ${SVNC_PASSWORD}; then
if [[ "${SVNC_PASSWORD}" = true ]]; then
rm -f "vnc_passwd"
fi
exit
......@@ -309,7 +309,7 @@ main () {
done
local client_options
client_options="${SVNC_CLIENT_OPTIONS:-}"
if ${SVNC_PASSWORD}; then
if [[ "${SVNC_PASSWORD}" = true ]]; then
echo "Fetching password from frontend."
ssh_frontend "cat .vnc/passwd" > vnc_passwd
client_options+=" -passwd vnc_passwd"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment