Add verification for install directory extraction

- Verify install directory exists after extraction
- Show archive contents if extraction fails
- Ensures install/install.py is available for direct execution
This commit is contained in:
master3395
2026-01-26 22:39:33 +01:00
parent 615e148467
commit 9006b1bb6b

View File

@@ -884,13 +884,27 @@ except Exception as e:
# Copy install directory to current location
if [ "$installer_url" = "https://raw.githubusercontent.com/master3395/cyberpanel/stable/cyberpanel.sh" ]; then
cp -r cyberpanel-stable/install . 2>/dev/null || true
cp -r cyberpanel-stable/install.sh . 2>/dev/null || true
if [ -d "cyberpanel-stable" ]; then
cp -r cyberpanel-stable/install . 2>/dev/null || true
cp -r cyberpanel-stable/install.sh . 2>/dev/null || true
fi
else
cp -r cyberpanel-v2.5.5-dev/install . 2>/dev/null || true
cp -r cyberpanel-v2.5.5-dev/install.sh . 2>/dev/null || true
if [ -d "cyberpanel-v2.5.5-dev" ]; then
cp -r cyberpanel-v2.5.5-dev/install . 2>/dev/null || true
cp -r cyberpanel-v2.5.5-dev/install.sh . 2>/dev/null || true
fi
fi
# Verify install directory was copied
if [ ! -d "install" ]; then
print_status "ERROR: install directory not found after extraction"
print_status "Archive contents:"
ls -la 2>/dev/null | head -20
return 1
fi
print_status "Verified install directory exists"
echo " ✓ CyberPanel installation files downloaded"
echo " 🔄 Starting CyberPanel installation..."
echo ""