use debug env var instead

This commit is contained in:
Matthew McClaskey 2023-11-13 18:46:13 +00:00
parent 597d27196c
commit c2977f499e
2 changed files with 10 additions and 2 deletions

View File

@ -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} --verbose
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

View File

@ -70,7 +70,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} --verbose
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