diff --git a/scripts/update/01-run.sh b/scripts/update/01-run.sh index 23dbb22..cbb2c26 100755 --- a/scripts/update/01-run.sh +++ b/scripts/update/01-run.sh @@ -128,7 +128,17 @@ cat < "$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 < "$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 # .local and Tor