From fa5b134600f29dc596f11948ac766716e6290c3b Mon Sep 17 00:00:00 2001 From: Michael Czechowski Date: Wed, 17 Sep 2025 16:57:55 +0200 Subject: [PATCH] fix: improve abra install retry logic and remove restart loop --- common.nix | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/common.nix b/common.nix index 7883e74..2b4c278 100644 --- a/common.nix +++ b/common.nix @@ -519,10 +519,13 @@ isoConfig fi # Attempt installation with retry logic - for attempt in {1..300}; do - echo "🚀 Installing abra (attempt $attempt/300)..." + for attempt in {1..60}; do + echo "🚀 Installing abra (attempt $attempt/60)..." - if curl -fsSL https://install.abra.coopcloud.tech | bash; then + # Quick internet check before attempting installation + if ! curl -s --max-time 3 https://abra.coopcloud.tech >/dev/null 2>&1; then + echo "🌐 No internet connectivity, skipping attempt $attempt" + elif curl -fsSL https://install.abra.coopcloud.tech | bash; then # Verify installation success using CORRECT check method if sudo abra --version >/dev/null 2>&1; then echo "✅ abra installed successfully" @@ -541,13 +544,13 @@ isoConfig echo "❌ Installation attempt $attempt failed" fi - if [ $attempt -lt 300 ]; then - echo "⏳ Retrying in 10 seconds..." - sleep 10 + if [ $attempt -lt 60 ]; then + echo "⏳ Retrying in 5 seconds..." + sleep 5 fi done - echo "❌ abra installation failed after 300 attempts" + echo "❌ abra installation failed after 60 attempts" exit 1 ''; @@ -555,8 +558,6 @@ isoConfig Type = "oneshot"; RemainAfterExit = true; User = "root"; - Restart = "on-failure"; - RestartSec = "30s"; Environment = [ "TERM=xterm-256color" "HOME=/root"