fix: simplify abra installation service

- Remove retry loop and internet connectivity checks from abra installation service
- Keep working sudo abra --version verification
- Simplify install() function to restart service once instead of 300 times
- Plain installation without overcomplicated logic
This commit is contained in:
2025-09-17 17:24:28 +02:00
parent 5477f97f5d
commit f70ba8ae25

View File

@@ -528,25 +528,22 @@ isoConfig
]; ];
script = '' script = ''
# Enhanced installation with proper verification # Plain abra installation
export TERM=xterm-256color export TERM=xterm-256color
export HOME=/root export HOME=/root
# Check if abra is already properly installed (CORRECTED VERIFICATION) # Check if abra is already properly installed
if sudo abra --version >/dev/null 2>&1; then if sudo abra --version >/dev/null 2>&1; then
echo " abra already installed and functional" echo " abra already installed and functional"
exit 0 exit 0
fi fi
# Attempt installation with retry logic echo "🚀 Installing abra system-wide..."
for attempt in {1..60}; do
echo "🚀 Installing abra (attempt $attempt/60)..."
# Quick internet check before attempting installation # Plain installation
if ! curl -s --max-time 3 https://abra.coopcloud.tech >/dev/null 2>&1; then curl -fsSL https://install.abra.coopcloud.tech | bash
echo "🌐 No internet connectivity, skipping attempt $attempt"
elif curl -fsSL https://install.abra.coopcloud.tech | bash; then # Verify installation
# Verify installation success using CORRECT check method
if sudo abra --version >/dev/null 2>&1; then if sudo abra --version >/dev/null 2>&1; then
echo " abra installed successfully" echo " abra installed successfully"
@@ -558,20 +555,9 @@ isoConfig
exit 0 exit 0
else else
echo " Installation script completed but abra not functional" echo " abra installation failed"
fi
else
echo " Installation attempt $attempt failed"
fi
if [ $attempt -lt 60 ]; then
echo " Retrying in 5 seconds..."
sleep 5
fi
done
echo " abra installation failed after 60 attempts"
exit 1 exit 1
fi
''; '';
serviceConfig = { serviceConfig = {
@@ -1214,7 +1200,7 @@ isoConfig
install() { install() {
echo "🔄 Checking and repairing abra installation..." echo "🔄 Checking and repairing abra installation..."
# Use the CORRECT check method (matches service verification) # Check if abra is already installed
if sudo abra --version >/dev/null 2>&1; then if sudo abra --version >/dev/null 2>&1; then
echo " abra is already installed and functional" echo " abra is already installed and functional"
return 0 return 0
@@ -1223,18 +1209,17 @@ isoConfig
echo "🔄 Restarting abra installation service..." echo "🔄 Restarting abra installation service..."
sudo systemctl restart workshop-abra-install sudo systemctl restart workshop-abra-install
# Monitor installation progress # Wait for service to complete
echo "📊 Monitoring installation..." sleep 5
for i in {1..30}; do
# Check if installation succeeded
if sudo abra --version >/dev/null 2>&1; then if sudo abra --version >/dev/null 2>&1; then
echo " abra installation completed successfully!" echo " abra installation completed successfully!"
return 0 return 0
fi else
sleep 2 echo " Installation failed. Try running 'install' again or check status:"
done
echo " Installation still not complete. Check status:"
echo " sudo systemctl status workshop-abra-install" echo " sudo systemctl status workshop-abra-install"
fi
} }
recipes() { recipes() {