diff --git a/ci-scripts/template-vars.yaml b/ci-scripts/template-vars.yaml index e89a78e..157e6ee 100644 --- a/ci-scripts/template-vars.yaml +++ b/ci-scripts/template-vars.yaml @@ -1,5 +1,6 @@ files: &UNIVERSAL_CHANGE_FILES - src/common/** + - src/common/startup_scripts/** - src/ubuntu/install/audio/** - src/ubuntu/install/audio_input/** - src/ubuntu/install/cleanup/** diff --git a/src/common/scripts/kasm_hook_scripts/kasm_pre_shutdown_user.sh b/src/common/scripts/kasm_hook_scripts/kasm_pre_shutdown_user.sh index 5253404..1fa44f0 100644 --- a/src/common/scripts/kasm_hook_scripts/kasm_pre_shutdown_user.sh +++ b/src/common/scripts/kasm_hook_scripts/kasm_pre_shutdown_user.sh @@ -62,7 +62,11 @@ if [ ! -z "$KASM_PROFILE_LDR" ]; then echo >&2 "Profile sync not available" else echo "Packing and uploading user profile to object storage." - http_proxy="" https_proxy="" /usr/bin/kasm-profile-sync --upload /home/kasm-user --insecure --filter "${KASM_PROFILE_FILTER}" --remote ${KASM_API_HOST} --port ${KASM_API_PORT} -c ${KASM_PROFILE_CHUNK_SIZE} --token ${KASM_API_JWT} + if [[ $DEBUG == true ]]; then + http_proxy="" https_proxy="" /usr/bin/kasm-profile-sync --upload /home/kasm-user --insecure --filter "${KASM_PROFILE_FILTER}" --remote ${KASM_API_HOST} --port ${KASM_API_PORT} -c ${KASM_PROFILE_CHUNK_SIZE} --token ${KASM_API_JWT} --verbose + else + http_proxy="" https_proxy="" /usr/bin/kasm-profile-sync --upload /home/kasm-user --insecure --filter "${KASM_PROFILE_FILTER}" --remote ${KASM_API_HOST} --port ${KASM_API_PORT} -c ${KASM_PROFILE_CHUNK_SIZE} --token ${KASM_API_JWT} + fi echo "Profile upload complete." fi fi diff --git a/src/common/startup_scripts/vnc_startup.sh b/src/common/startup_scripts/vnc_startup.sh index 11822a4..57d3d7d 100755 --- a/src/common/startup_scripts/vnc_startup.sh +++ b/src/common/startup_scripts/vnc_startup.sh @@ -52,8 +52,6 @@ function help (){ -d, --debug enables more detailed startup output e.g. 'docker run kasmweb/core --debug bash' -h, --help print out this help - - Fore more information see: https://github.com/ConSol/docker-headless-vnc-container " } @@ -70,7 +68,11 @@ function pull_profile (){ echo "Downloading and unpacking user profile from object storage." set +e - http_proxy="" https_proxy="" /usr/bin/kasm-profile-sync --download /home/kasm-user --insecure --remote ${KASM_API_HOST} --port ${KASM_API_PORT} -c ${KASM_PROFILE_CHUNK_SIZE} --token ${KASM_API_JWT} + if [[ $DEBUG == true ]]; then + http_proxy="" https_proxy="" /usr/bin/kasm-profile-sync --download /home/kasm-user --insecure --remote ${KASM_API_HOST} --port ${KASM_API_PORT} -c ${KASM_PROFILE_CHUNK_SIZE} --token ${KASM_API_JWT} --verbose + else + http_proxy="" https_proxy="" /usr/bin/kasm-profile-sync --download /home/kasm-user --insecure --remote ${KASM_API_HOST} --port ${KASM_API_PORT} -c ${KASM_PROFILE_CHUNK_SIZE} --token ${KASM_API_JWT} + fi PROCESS_SYNC_EXIT_CODE=$? set -e if (( PROCESS_SYNC_EXIT_CODE > 1 )); then @@ -318,6 +320,12 @@ if [[ $1 =~ -h|--help ]]; then exit 0 fi +if [[ ${KASM_DEBUG:-0} == 1 ]]; then + echo -e "\n\n------------------ DEBUG KASM STARTUP -----------------" + export DEBUG=true + set -x +fi + # Syncronize user-space loaded persistent profiles pull_profile @@ -326,12 +334,6 @@ if [ -f $HOME/.bashrc ]; then source $HOME/.bashrc fi -if [[ ${KASM_DEBUG:-0} == 1 ]]; then - echo -e "\n\n------------------ DEBUG KASM STARTUP -----------------" - export DEBUG=true - set -x -fi - ## resolve_vnc_connection VNC_IP=$(hostname -i) if [[ $DEBUG == true ]]; then