Browse Source

Autorecover from Docker failure during update (#1154)

specter-1.7.2
Luke Childs 3 years ago
committed by GitHub
parent
commit
196c235fe1
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 12
      scripts/update/01-run.sh

12
scripts/update/01-run.sh

@ -128,7 +128,17 @@ cat <<EOF > "$UMBREL_ROOT"/statuses/update-status.json
{"state": "installing", "progress": 70, "description": "Removing old containers", "updateTo": "$RELEASE"}
EOF
cd "$UMBREL_ROOT"
./scripts/stop
./scripts/stop || {
# If Docker fails to stop containers we're most likely hitting this Docker bug: https://github.com/moby/moby/issues/17217
# Restarting the Docker service seems to fix it
echo "Attempting to autofix Docker failure"
cat <<EOF > "$UMBREL_ROOT"/statuses/update-status.json
{"state": "installing", "progress": 70, "description": "Attempting to autofix Docker failure", "updateTo": "$RELEASE"}
EOF
sudo systemctl restart docker
sleep 1
./scripts/stop
}
# Fix broken Nextcloud installs from Umbrel v0.4.0 to be accessible from both
# <hostname>.local and Tor

Loading…
Cancel
Save