Browse Source

Logs

show-update-errors
Luke Childs 3 years ago
parent
commit
4f2191a734
  1. 3
      scripts/update/update

3
scripts/update/update

@ -141,13 +141,16 @@ update_state=$(cat "${UMBREL_ROOT}/statuses/update-status.json" | jq .state -r)
# Show error # Show error
update_failure_status_file="${UMBREL_ROOT}/statuses/update-failure" update_failure_status_file="${UMBREL_ROOT}/statuses/update-failure"
echo "checking error status..."
if [[ -f "${update_failure_status_file}" ]]; then if [[ -f "${update_failure_status_file}" ]]; then
echo "file exists"
reason=$(cat "${update_failure_status_file}") reason=$(cat "${update_failure_status_file}")
rm "${update_failure_status_file}" rm "${update_failure_status_file}"
cat <<EOF > "${UMBREL_ROOT}/statuses/update-status.json" cat <<EOF > "${UMBREL_ROOT}/statuses/update-status.json"
{"state": "failed", "progress": 100, "description": "${reason}", "updateTo": ""} {"state": "failed", "progress": 100, "description": "${reason}", "updateTo": ""}
EOF EOF
fi fi
echo file does not exist
if [[ "${update_state}" != "success" ]] && [[ "${update_state}" != "failed" ]]; then if [[ "${update_state}" != "success" ]] && [[ "${update_state}" != "failed" ]]; then
# Sleep for a few seconds to make sure the user is on the update view # Sleep for a few seconds to make sure the user is on the update view

Loading…
Cancel
Save