mirror of https://github.com/lukechilds/umbrel.git
Luke Childs
4 years ago
6 changed files with 20 additions and 13 deletions
@ -1,6 +1,6 @@ |
|||
{ |
|||
"version": "0.2.10", |
|||
"name": "Umbrel v0.2.10", |
|||
"version": "0.2.69", |
|||
"name": "Umbrel v0.2.69", |
|||
"requires": ">=0.2.1", |
|||
"notes": "This update brings some minor bugfixes and adds monitoring functionality to ensure your external storage device is running reliably." |
|||
} |
|||
|
@ -1,16 +1,23 @@ |
|||
#!/usr/bin/env bash |
|||
set -euo pipefail |
|||
|
|||
UMBREL_ROOT=$1 |
|||
RELEASE=$1 |
|||
UMBREL_ROOT=$2 |
|||
first_run=$3 |
|||
|
|||
# Abort on low memory devices |
|||
if true; then |
|||
memory_error="Sorry, this update isn't compatible with your device, it requires at least 2GB RAM." |
|||
echo "${memory_error}" |
|||
cat <<EOF > "$UMBREL_ROOT"/statuses/update-status.json |
|||
{"state": "failed", "progress": 100, "description": "${memory_error}", "updateTo": ""} |
|||
if [[ "${first_run}" == "firstrun" ]]; then |
|||
cat <<EOF > "$UMBREL_ROOT"/statuses/update-status.json |
|||
{"state": "installing", "progress": 20, "description": "Checking device memory", "updateTo": "${RELEASE}"} |
|||
EOF |
|||
# Sleep for a few seconds so the failure gets a chance to be picked up by the UI |
|||
sleep 5 |
|||
# Sleep for a few seconds so the user has been redirected to the update screen |
|||
sleep 10 |
|||
memory_error="Sorry, this update isn't compatible with your device, it requires at least 2GB RAM." |
|||
echo "${memory_error}" |
|||
cat <<EOF > "$UMBREL_ROOT"/statuses/update-status.json |
|||
{"state": "failed", "progress": 100, "description": "${memory_error}", "updateTo": "${RELEASE}"} |
|||
EOF |
|||
fi |
|||
exit 1 |
|||
fi |
|||
|
Loading…
Reference in new issue