Browse Source
Run Umbrel OS security updates during OTA update (#293)
dashboard-0.3.15
Aaron Dewes
4 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
13 additions and
1 deletions
-
scripts/update/01-run.sh
|
|
@ -54,10 +54,22 @@ if [[ ! -z "${UMBREL_OS:-}" ]]; then |
|
|
|
echo "ERROR: No Umbrel installation found at SD root ${SD_CARD_UMBREL_ROOT}" |
|
|
|
echo "Skipping updating on SD Card..." |
|
|
|
fi |
|
|
|
|
|
|
|
# Update apt packages on update |
|
|
|
# Remember, the apt package is called unattended-updates, the command is unattended-update |
|
|
|
if ! command -v unattended-update &> /dev/null; then |
|
|
|
DEBIAN_FRONTEND=noninteractive apt-get install unattended-updates -y |
|
|
|
fi |
|
|
|
# Manual run of the update (Normally for debugging purposes only, but we don't want to have a potential backdoor in Umbrel) |
|
|
|
# https://wiki.debian.org/UnattendedUpgrades#Manual_run_.28for_debugging.29 |
|
|
|
cat <<EOF > "$UMBREL_ROOT"/statuses/update-status.json |
|
|
|
{"state": "installing", "progress": 30, "description": "Installing security updates", "updateTo": "$RELEASE"} |
|
|
|
EOF |
|
|
|
unattended-upgrade -d |
|
|
|
fi |
|
|
|
|
|
|
|
cat <<EOF > "$UMBREL_ROOT"/statuses/update-status.json |
|
|
|
{"state": "installing", "progress": 33, "description": "Configuring settings", "updateTo": "$RELEASE"} |
|
|
|
{"state": "installing", "progress": 35, "description": "Configuring settings", "updateTo": "$RELEASE"} |
|
|
|
EOF |
|
|
|
|
|
|
|
# Checkout to the new release |
|
|
|