mirror of
https://github.com/MacRimi/ProxMenux.git
synced 2025-11-19 03:56:18 +00:00
feat: add comprehensive project documentation and analysis
- Created detailed documentation covering ProxMenux project structure, installation flow, and core components - Added in-depth analysis of script architecture, execution patterns, and key functionalities - Documented system configuration, translation mechanism, and component interactions - Included detailed breakdown of file organization, menu system, and installation processes - Added technical specifications for ProxMenux Monitor web dashboar
This commit is contained in:
699
docs/02.GUIA_MODIFICACION_OFFLINE.md
Normal file
699
docs/02.GUIA_MODIFICACION_OFFLINE.md
Normal file
@@ -0,0 +1,699 @@
|
||||
# Scripts a Modificar para Ejecución 100% Local
|
||||
|
||||
**Fecha**: 2025-11-01
|
||||
**Objetivo**: Eliminar dependencias de GitHub y permitir ejecución completamente local
|
||||
**Repositorio**: ProxMenuxDotDeb
|
||||
|
||||
---
|
||||
|
||||
## Resumen Ejecutivo
|
||||
|
||||
Para que ProxMenux funcione 100% localmente sin depender de GitHub, se deben modificar **47 archivos** en total:
|
||||
|
||||
- **2 archivos principales** (instalador y comando menu)
|
||||
- **13 scripts de menús** (sistema de navegación)
|
||||
- **32 scripts funcionales** (operaciones específicas)
|
||||
|
||||
**Cambios principales**:
|
||||
1. Cambiar `REPO_URL` de GitHub a rutas locales del sistema
|
||||
2. Reemplazar descargas `curl` por ejecución de scripts locales
|
||||
3. Copiar todos los scripts a `/usr/local/share/proxmenux/scripts/` durante instalación
|
||||
|
||||
---
|
||||
|
||||
## 1. Archivos Principales (CRÍTICOS) ⚠️
|
||||
|
||||
### 1.1. `install_proxmenux.sh` (Raíz del repositorio)
|
||||
|
||||
**Líneas a modificar**:
|
||||
- **Línea 37**: `REPO_URL="https://raw.githubusercontent.com/MacRimi/ProxMenux/main"`
|
||||
- **Línea 38**: `UTILS_URL="https://raw.githubusercontent.com/MacRimi/ProxMenux/main/scripts/utils.sh"`
|
||||
- **Línea 54-57**: Carga de `utils.sh` con curl
|
||||
- **Línea 459-476**: Descarga de archivos con wget (versión normal)
|
||||
- **Línea 583-603**: Descarga de archivos con wget (versión traducción)
|
||||
|
||||
**Cambios necesarios**:
|
||||
```bash
|
||||
# Cambiar URLs a rutas locales
|
||||
REPO_URL="/usr/local/share/proxmenux"
|
||||
UTILS_URL="./scripts/utils.sh"
|
||||
|
||||
# Reemplazar wget por cp
|
||||
# En lugar de descargar, copiar archivos locales del repositorio
|
||||
```
|
||||
|
||||
**Impacto**: 🔴 CRÍTICO - Sin esto, la instalación falla completamente
|
||||
|
||||
---
|
||||
|
||||
### 1.2. `menu` (Raíz del repositorio)
|
||||
|
||||
**Líneas a modificar**:
|
||||
- **Línea 34**: `REPO_URL="https://raw.githubusercontent.com/MacRimi/ProxMenux/main"`
|
||||
- **Línea 52**: Verificación de actualizaciones (curl remoto)
|
||||
- **Línea 72**: Descarga de instalador actualizado
|
||||
- **Línea 85**: `exec bash <(curl -fsSL "$REPO_URL/scripts/menus/main_menu.sh")`
|
||||
|
||||
**Cambios necesarios**:
|
||||
```bash
|
||||
# Cambiar a ruta local
|
||||
LOCAL_SCRIPTS="/usr/local/share/proxmenux/scripts"
|
||||
|
||||
# Ejecutar localmente
|
||||
exec bash "$LOCAL_SCRIPTS/menus/main_menu.sh"
|
||||
```
|
||||
|
||||
**Impacto**: 🔴 CRÍTICO - Es el punto de entrada del usuario
|
||||
|
||||
---
|
||||
|
||||
## 2. Scripts de Menús (13 archivos)
|
||||
|
||||
### 2.1. `scripts/menus/main_menu.sh` ⭐
|
||||
|
||||
**Modificaciones**:
|
||||
- **Línea 14**: `REPO_URL`
|
||||
- **Línea 57**: curl para reinstalación PVE9
|
||||
- **Líneas 125-135**: Todas las opciones del menú (12 líneas)
|
||||
|
||||
**Comandos a reemplazar**:
|
||||
```bash
|
||||
# Todas estas líneas:
|
||||
exec bash <(curl -s "$REPO_URL/scripts/menus/menu_post_install.sh")
|
||||
exec bash <(curl -s "$REPO_URL/scripts/menus/hw_grafics_menu.sh")
|
||||
exec bash <(curl -s "$REPO_URL/scripts/menus/create_vm_menu.sh")
|
||||
exec bash <(curl -s "$REPO_URL/scripts/menus/storage_menu.sh")
|
||||
exec bash <(curl -s "$REPO_URL/scripts/menus/share_menu.sh")
|
||||
exec bash <(curl -s "$REPO_URL/scripts/menus/menu_Helper_Scripts.sh")
|
||||
exec bash <(curl -s "$REPO_URL/scripts/menus/network_menu.sh")
|
||||
exec bash <(curl -s "$REPO_URL/scripts/menus/utilities_menu.sh")
|
||||
bash <(curl -s "$REPO_URL/scripts/help_info_menu.sh")
|
||||
exec bash <(curl -s "$REPO_URL/scripts/menus/config_menu.sh")
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
### 2.2. `scripts/menus/menu_post_install.sh`
|
||||
|
||||
**Modificaciones**:
|
||||
- **Línea 12**: `REPO_URL`
|
||||
- **Línea 73**: `bash <(curl -s $REPO_URL/scripts/post_install/auto_post_install.sh)`
|
||||
- **Línea 171**: `exec bash <(curl -s "$REPO_URL/scripts/menus/main_menu.sh")`
|
||||
|
||||
**Nota**: Mantener URLs remotas para scripts de comunidad externa (líneas 90-91)
|
||||
|
||||
---
|
||||
|
||||
### 2.3. `scripts/menus/config_menu.sh`
|
||||
|
||||
**Modificaciones**:
|
||||
- **Línea 13**: `REPO_URL`
|
||||
- No tiene llamadas curl ✅
|
||||
|
||||
---
|
||||
|
||||
### 2.4. `scripts/menus/create_vm_menu.sh`
|
||||
|
||||
**Modificaciones**:
|
||||
- **Línea 13**: `REPO_URL`
|
||||
- Múltiples `exec bash <(curl -s ...)` en opciones del menú
|
||||
|
||||
---
|
||||
|
||||
### 2.5. `scripts/menus/hw_grafics_menu.sh`
|
||||
|
||||
**Modificaciones**:
|
||||
- **Línea 13**: `REPO_URL`
|
||||
- **Líneas 38, 44, 50, 55, 56**: Llamadas curl
|
||||
|
||||
**Comandos a reemplazar**:
|
||||
```bash
|
||||
bash <(curl -s "$REPO_URL/scripts/configure_igpu_lxc.sh")
|
||||
bash <(curl -s "$REPO_URL/scripts/install_coral_lxc.sh")
|
||||
bash <(curl -s "$REPO_URL/scripts/gpu_tpu/install_coral_pve9.sh")
|
||||
exec bash <(curl -s "$REPO_URL/scripts/menus/main_menu.sh")
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
### 2.6. `scripts/menus/lxc_menu.sh`
|
||||
|
||||
**Modificaciones**:
|
||||
- **Línea 13**: `REPO_URL`
|
||||
- Todos los `exec bash <(curl ...)`
|
||||
|
||||
---
|
||||
|
||||
### 2.7. `scripts/menus/menu_Helper_Scripts.sh`
|
||||
|
||||
**Modificaciones**:
|
||||
- **Línea 13**: `REPO_URL`
|
||||
- **Línea 296**: `exec bash <(curl -s ...)`
|
||||
|
||||
**Nota**: Mantener URLs de Helper-Scripts externos (comunidad)
|
||||
|
||||
---
|
||||
|
||||
### 2.8. `scripts/menus/network_menu.sh`
|
||||
|
||||
**Modificaciones**:
|
||||
- **Línea 13**: `REPO_URL`
|
||||
- **Línea 1085**: `exec bash <(curl -s "$REPO_URL/scripts/menus/main_menu.sh")`
|
||||
|
||||
---
|
||||
|
||||
### 2.9. `scripts/menus/share_menu.sh`
|
||||
|
||||
**Modificaciones**:
|
||||
- **Línea 13**: `REPO_URL`
|
||||
- **Líneas 46, 55-82, 85**: 11 llamadas curl
|
||||
|
||||
**Comandos a reemplazar**:
|
||||
```bash
|
||||
bash <(curl -s "$REPO_URL/scripts/share/nfs_host.sh")
|
||||
bash <(curl -s "$REPO_URL/scripts/share/samba_host.sh")
|
||||
bash <(curl -s "$REPO_URL/scripts/share/local-shared-manager.sh")
|
||||
bash <(curl -s "$REPO_URL/scripts/share/lxc-mount-manager_minimal.sh")
|
||||
bash <(curl -s "$REPO_URL/scripts/share/nfs_client.sh")
|
||||
bash <(curl -s "$REPO_URL/scripts/share/samba_client.sh")
|
||||
bash <(curl -s "$REPO_URL/scripts/share/nfs_lxc_server.sh")
|
||||
bash <(curl -s "$REPO_URL/scripts/share/samba_lxc_server.sh")
|
||||
bash <(curl -s "$REPO_URL/scripts/share/commands_share.sh")
|
||||
exec bash <(curl -s "$REPO_URL/scripts/menus/main_menu.sh") # 2 veces
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
### 2.10. `scripts/menus/storage_menu.sh`
|
||||
|
||||
**Modificaciones**:
|
||||
- **Línea 15**: `REPO_URL`
|
||||
- **Líneas 39, 42, 45, 48, 51**: 5 llamadas curl
|
||||
|
||||
**Comandos a reemplazar**:
|
||||
```bash
|
||||
bash <(curl -s "$REPO_URL/scripts/storage/disk-passthrough.sh")
|
||||
bash <(curl -s "$REPO_URL/scripts/storage/disk-passthrough_ct.sh")
|
||||
bash <(curl -s "$REPO_URL/scripts/storage/import-disk-image.sh")
|
||||
exec bash <(curl -s "$REPO_URL/scripts/menus/main_menu.sh") # 2 veces
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
### 2.11. `scripts/menus/utilities_menu.sh`
|
||||
|
||||
**Modificaciones**:
|
||||
- **Línea 15**: `REPO_URL`
|
||||
- **Líneas 39, 45, 67, 74, 79, 80**: 6 llamadas curl
|
||||
|
||||
**Comandos a reemplazar**:
|
||||
```bash
|
||||
bash <(curl -s "$REPO_URL/scripts/utilities/uup_dump_iso_creator.sh")
|
||||
bash <(curl -s "$REPO_URL/scripts/utilities/system_utils.sh")
|
||||
bash <(curl -s "$REPO_URL/scripts/utilities/proxmox_update.sh")
|
||||
bash <(curl -s "$REPO_URL/scripts/utilities/upgrade_pve8_to_pve9.sh")
|
||||
exec bash <(curl -s "$REPO_URL/scripts/menus/main_menu.sh") # 2 veces
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
### 2.12. `scripts/menus/main_menu_.sh`
|
||||
|
||||
**Modificaciones**: Igual que `main_menu.sh` (archivo alternativo/backup)
|
||||
|
||||
---
|
||||
|
||||
### 2.13. `scripts/menus/sm.sh`
|
||||
|
||||
**Modificaciones**: Igual que `share_menu.sh` (archivo alternativo)
|
||||
|
||||
---
|
||||
|
||||
## 3. Scripts Post-Instalación (3 archivos)
|
||||
|
||||
### 3.1. `scripts/post_install/auto_post_install.sh`
|
||||
|
||||
**Modificaciones**:
|
||||
- **Línea 39**: `REPO_URL`
|
||||
- **Línea 110**: `bash <(curl -fsSL "$REPO_URL/scripts/global/update-pve9_2.sh")`
|
||||
- **Línea 113**: `bash <(curl -fsSL "$REPO_URL/scripts/global/update-pve8.sh")`
|
||||
- **Línea 150**: `bash <(curl -fsSL "$REPO_URL/scripts/global/remove-banner-pve-v3.sh")`
|
||||
- **Línea 157**: `bash <(curl -fsSL "$REPO_URL/scripts/global/remove-banner-pve8.sh")`
|
||||
|
||||
---
|
||||
|
||||
### 3.2. `scripts/post_install/customizable_post_install.sh`
|
||||
|
||||
**Modificaciones**:
|
||||
- **Línea 39**: `REPO_URL`
|
||||
- **Línea 197**: `bash <(curl -fsSL "$REPO_URL/scripts/global/update-pve9_2.sh")`
|
||||
- **Línea 200**: `bash <(curl -fsSL "$REPO_URL/scripts/global/update-pve8.sh")`
|
||||
- **Línea 2905**: `bash <(curl -fsSL "$REPO_URL/scripts/global/remove-banner-pve-v3.sh")`
|
||||
- **Línea 2908**: `bash <(curl -fsSL "$REPO_URL/scripts/global/remove-banner-pve8.sh")`
|
||||
|
||||
---
|
||||
|
||||
### 3.3. `scripts/post_install/uninstall-tools.sh`
|
||||
|
||||
**Modificaciones**: Solo lectura de configs locales ✅
|
||||
|
||||
---
|
||||
|
||||
## 4. Scripts de VMs (8 archivos)
|
||||
|
||||
### 4.1. `scripts/vm/create_vm.sh`
|
||||
|
||||
**Modificaciones**:
|
||||
- **Línea 29**: `REPO_URL`
|
||||
- **Líneas 30-32**: `VM_REPO`, `ISO_REPO`, `MENU_REPO`
|
||||
|
||||
---
|
||||
|
||||
### 4.2. `scripts/vm/select_linux_iso.sh`
|
||||
|
||||
**Modificaciones**:
|
||||
- **Línea 28**: `REPO_URL`
|
||||
- **Línea 222**: `exec bash <(curl -s "$REPO_URL/scripts/vm/create_vm.sh")`
|
||||
|
||||
---
|
||||
|
||||
### 4.3. `scripts/vm/select_windows_iso.sh`
|
||||
|
||||
**Modificaciones**:
|
||||
- **Línea 27**: `REPO_URL`
|
||||
- **Línea 28**: `UUP_REPO`
|
||||
|
||||
---
|
||||
|
||||
### 4.4. `scripts/vm/select_nas_iso.sh`
|
||||
|
||||
**Modificaciones**:
|
||||
- **Línea 31**: `REPO_URL`
|
||||
- **Línea 65**: `bash <(curl -s "$REPO_URL/scripts/vm/synology.sh")`
|
||||
- **Línea 106**: `bash <(curl -s "$REPO_URL/scripts/vm/zimaos.sh")`
|
||||
|
||||
---
|
||||
|
||||
### 4.5. `scripts/vm/synology.sh`
|
||||
|
||||
**Modificaciones**:
|
||||
- **Línea 32**: `REPO_URL`
|
||||
|
||||
---
|
||||
|
||||
### 4.6. `scripts/vm/synology_.sh`
|
||||
|
||||
**Modificaciones**:
|
||||
- **Línea 32**: `REPO_URL`
|
||||
|
||||
---
|
||||
|
||||
### 4.7. `scripts/vm/zimaos.sh`
|
||||
|
||||
**Modificaciones**:
|
||||
- Verificar si tiene `REPO_URL`
|
||||
|
||||
---
|
||||
|
||||
### 4.8. `scripts/vm/vm_creator.sh`
|
||||
|
||||
**Modificaciones**:
|
||||
- **Línea 497**: `bash <(curl -fsSL "$REPO_URL/scripts/menus/create_vm_menu.sh")`
|
||||
|
||||
---
|
||||
|
||||
## 5. Scripts de LXC (4 archivos)
|
||||
|
||||
### 5.1. `scripts/lxc/lxc-manual-guide.sh`
|
||||
|
||||
**Modificaciones**:
|
||||
- **Línea 14**: `REPO_URL`
|
||||
|
||||
---
|
||||
|
||||
### 5.2. `scripts/lxc/lxc-privileged-to-unprivileged.sh`
|
||||
|
||||
**Modificaciones**:
|
||||
- **Línea 18**: `REPO_URL`
|
||||
|
||||
---
|
||||
|
||||
### 5.3. `scripts/lxc/lxc-unprivileged-to-privileged.sh`
|
||||
|
||||
**Modificaciones**:
|
||||
- **Línea 19**: `REPO_URL`
|
||||
|
||||
---
|
||||
|
||||
### 5.4. `scripts/lxc/lxc-mount-manager_minimal.sh`
|
||||
|
||||
**Modificaciones**:
|
||||
- Verificar si tiene `REPO_URL`
|
||||
|
||||
---
|
||||
|
||||
## 6. Scripts de Compartir Recursos (9 archivos)
|
||||
|
||||
### 6.1. `scripts/share/nfs_host.sh`
|
||||
|
||||
**Modificaciones**:
|
||||
- **Línea 16**: `REPO_URL`
|
||||
|
||||
---
|
||||
|
||||
### 6.2. `scripts/share/nfs_client.sh`
|
||||
|
||||
**Modificaciones**:
|
||||
- **Línea 16**: `REPO_URL`
|
||||
|
||||
---
|
||||
|
||||
### 6.3. `scripts/share/nfs_lxc_server.sh`
|
||||
|
||||
**Modificaciones**:
|
||||
- **Línea 16**: `REPO_URL`
|
||||
|
||||
---
|
||||
|
||||
### 6.4. `scripts/share/samba_host.sh`
|
||||
|
||||
**Modificaciones**:
|
||||
- **Línea 16**: `REPO_URL`
|
||||
|
||||
---
|
||||
|
||||
### 6.5. `scripts/share/samba_client.sh`
|
||||
|
||||
**Modificaciones**:
|
||||
- **Línea 18**: `REPO_URL`
|
||||
|
||||
---
|
||||
|
||||
### 6.6. `scripts/share/samba_lxc_server.sh`
|
||||
|
||||
**Modificaciones**:
|
||||
- **Línea 16**: `REPO_URL`
|
||||
|
||||
---
|
||||
|
||||
### 6.7. `scripts/share/local-shared-manager.sh`
|
||||
|
||||
**Modificaciones**:
|
||||
- **Línea 13**: `REPO_URL`
|
||||
|
||||
---
|
||||
|
||||
### 6.8. `scripts/share/lxc-mount-manager_minimal.sh`
|
||||
|
||||
**Modificaciones**:
|
||||
- Verificar `REPO_URL`
|
||||
|
||||
---
|
||||
|
||||
### 6.9. `scripts/share/commands_share.sh`
|
||||
|
||||
**Modificaciones**:
|
||||
- **Línea 14**: `REPO_URL`
|
||||
|
||||
---
|
||||
|
||||
## 7. Scripts de Almacenamiento (3 archivos)
|
||||
|
||||
### 7.1. `scripts/storage/disk-passthrough.sh`
|
||||
|
||||
**Modificaciones**:
|
||||
- Verificar `REPO_URL`
|
||||
|
||||
---
|
||||
|
||||
### 7.2. `scripts/storage/disk-passthrough_ct.sh`
|
||||
|
||||
**Modificaciones**:
|
||||
- Verificar `REPO_URL`
|
||||
|
||||
---
|
||||
|
||||
### 7.3. `scripts/storage/import-disk-image.sh`
|
||||
|
||||
**Modificaciones**:
|
||||
- **Línea 30**: `REPO_URL`
|
||||
|
||||
---
|
||||
|
||||
## 8. Scripts de Utilidades (4 archivos)
|
||||
|
||||
### 8.1. `scripts/utilities/upgrade_pve8_to_pve9.sh`
|
||||
|
||||
**Modificaciones**:
|
||||
- Verificar `REPO_URL`
|
||||
|
||||
---
|
||||
|
||||
### 8.2. `scripts/utilities/system_utils.sh`
|
||||
|
||||
**Modificaciones**:
|
||||
- Verificar `REPO_URL`
|
||||
|
||||
---
|
||||
|
||||
### 8.3. `scripts/utilities/proxmox_update.sh`
|
||||
|
||||
**Modificaciones**:
|
||||
- Verificar `REPO_URL`
|
||||
|
||||
---
|
||||
|
||||
### 8.4. `scripts/utilities/uup_dump_iso_creator.sh`
|
||||
|
||||
**Modificaciones**:
|
||||
- Verificar `REPO_URL`
|
||||
|
||||
---
|
||||
|
||||
## 9. Scripts Globales (3 archivos)
|
||||
|
||||
### 9.1. `scripts/global/update-pve.sh`
|
||||
|
||||
**Modificaciones**:
|
||||
- **Línea 32**: `source <(curl -s "$REPO_URL/scripts/global/common-functions.sh")`
|
||||
|
||||
**Cambiar a**:
|
||||
```bash
|
||||
source "$LOCAL_SCRIPTS/global/common-functions.sh"
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
### 9.2. `scripts/global/update-pve8.sh`
|
||||
|
||||
**Modificaciones**:
|
||||
- **Línea 32**: `source <(curl -s "$REPO_URL/scripts/global/common-functions.sh")`
|
||||
|
||||
---
|
||||
|
||||
### 9.3. `scripts/global/update-pve9_2.sh`
|
||||
|
||||
**Modificaciones**:
|
||||
- **Línea 32**: `source <(curl -s "$REPO_URL/scripts/global/common-functions.sh")`
|
||||
|
||||
---
|
||||
|
||||
## 10. Scripts de Hardware (2 archivos)
|
||||
|
||||
### 10.1. `scripts/configure_igpu_lxc.sh`
|
||||
|
||||
**Modificaciones**:
|
||||
- **Línea 19**: `REPO_URL`
|
||||
|
||||
---
|
||||
|
||||
### 10.2. `scripts/install_coral_lxc.sh`
|
||||
|
||||
**Modificaciones**:
|
||||
- **Línea 25**: `REPO_URL`
|
||||
|
||||
---
|
||||
|
||||
## 11. Scripts de Red (2 archivos)
|
||||
|
||||
### 11.1. `scripts/repair_network.sh`
|
||||
|
||||
**Modificaciones**:
|
||||
- **Línea 204**: `exec bash <(curl -s "$REPO_URL/scripts/menus/main_menu.sh")`
|
||||
- **Línea 205**: `exec bash <(curl -s "$REPO_URL/scripts/menus/main_menu.sh")`
|
||||
|
||||
---
|
||||
|
||||
### 11.2. `scripts/telegram-notifier.sh`
|
||||
|
||||
**Modificaciones**:
|
||||
- **Línea 5**: `REPO_URL`
|
||||
|
||||
---
|
||||
|
||||
## 12. Scripts Duplicados/Alternos (en `scripts/auto_post_install.sh`)
|
||||
|
||||
**Modificaciones**: Igual que `scripts/post_install/auto_post_install.sh`
|
||||
|
||||
---
|
||||
|
||||
## Tabla Resumen
|
||||
|
||||
| Categoría | Archivos | Modificaciones Principales |
|
||||
|-----------|----------|---------------------------|
|
||||
| **Principales** | 2 | REPO_URL + curl → rutas locales |
|
||||
| **Menús** | 13 | REPO_URL + exec bash curl |
|
||||
| **Post-Install** | 3 | bash curl a scripts global |
|
||||
| **VMs** | 8 | REPO_URL + llamadas remotas |
|
||||
| **LXC** | 4 | REPO_URL |
|
||||
| **Share** | 9 | REPO_URL |
|
||||
| **Storage** | 3 | REPO_URL |
|
||||
| **Utilities** | 4 | REPO_URL |
|
||||
| **Global** | 3 | source curl |
|
||||
| **Hardware** | 2 | REPO_URL |
|
||||
| **Red** | 2 | exec bash curl |
|
||||
| **TOTAL** | **47** | **~150-200 líneas** |
|
||||
|
||||
---
|
||||
|
||||
## Plan de Implementación Recomendado
|
||||
|
||||
### Paso 1: Preparación
|
||||
```bash
|
||||
# Crear backup
|
||||
cp -r . ../ProxMenuxDotDeb_backup
|
||||
|
||||
# --------------------------------------------------------------------
|
||||
# Documentar información relevante del proyecto en directorio "docs"
|
||||
# --------------------------------------------------------------------
|
||||
```
|
||||
|
||||
### Paso 2: Modificación Automática Global
|
||||
```bash
|
||||
# Script de conversión masiva
|
||||
find . -name "*.sh" -o -name "menu" | xargs sed -i \
|
||||
's|REPO_URL="https://raw.githubusercontent.com/MacRimi/ProxMenux/main"|LOCAL_SCRIPTS="/usr/local/share/proxmenux/scripts"|g'
|
||||
|
||||
# Cambiar referencias
|
||||
find . -name "*.sh" -o -name "menu" | xargs sed -i \
|
||||
's|\$REPO_URL/scripts|\$LOCAL_SCRIPTS|g'
|
||||
|
||||
# Cambiar bash curl
|
||||
find . -name "*.sh" -o -name "menu" | xargs sed -i -E \
|
||||
's|bash <\(curl -[sfSL]+ "\$REPO_URL/([^"]+)"|bash "\$LOCAL_SCRIPTS/\1"|g'
|
||||
|
||||
# Cambiar exec bash curl
|
||||
find . -name "*.sh" -o -name "menu" | xargs sed -i -E \
|
||||
's|exec bash <\(curl -[sfSL]+ "\$REPO_URL/([^"]+)"|exec bash "\$LOCAL_SCRIPTS/\1"|g'
|
||||
|
||||
# Cambiar source curl
|
||||
find . -name "*.sh" | xargs sed -i -E \
|
||||
's|source <\(curl -[sfSL]+ "\$REPO_URL/([^"]+)"|source "\$LOCAL_SCRIPTS/\1"|g'
|
||||
```
|
||||
|
||||
### Paso 3: Modificar install_proxmenux.sh manualmente
|
||||
|
||||
Cambiar secciones de descarga wget por copias locales:
|
||||
```bash
|
||||
# En lugar de:
|
||||
wget -qO "$dest" "$url"
|
||||
|
||||
# Usar:
|
||||
cp "./scripts/utils.sh" "$UTILS_FILE"
|
||||
cp "./menu" "$INSTALL_DIR/$MENU_SCRIPT"
|
||||
cp "./version.txt" "$LOCAL_VERSION_FILE"
|
||||
```
|
||||
|
||||
Agregar copia de todos los scripts:
|
||||
```bash
|
||||
msg_info "Copying local scripts..."
|
||||
mkdir -p "$BASE_DIR/scripts"
|
||||
cp -r "./scripts/"* "$BASE_DIR/scripts/"
|
||||
chmod -R +x "$BASE_DIR/scripts/"
|
||||
```
|
||||
|
||||
### Paso 4: Modificar comando menu
|
||||
|
||||
Comentar o modificar verificación de actualizaciones remotas.
|
||||
|
||||
### Paso 5: Validación
|
||||
```bash
|
||||
# Verificar que no queden referencias remotas
|
||||
grep -r "githubusercontent.com" . --include="*.sh" --include="menu"
|
||||
|
||||
# Verificar llamadas curl
|
||||
grep -r "curl.*REPO_URL" . --include="*.sh" --include="menu"
|
||||
|
||||
# Contar archivos modificados
|
||||
grep -r "LOCAL_SCRIPTS=" . --include="*.sh" --include="menu" | wc -l
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Estructura Post-Modificación
|
||||
|
||||
```
|
||||
/usr/local/share/proxmenux/
|
||||
├── utils.sh
|
||||
├── config.json
|
||||
├── cache.json
|
||||
├── version.txt
|
||||
├── ProxMenux-Monitor.AppImage
|
||||
└── scripts/ # ⭐ NUEVO
|
||||
├── menus/
|
||||
│ ├── main_menu.sh
|
||||
│ ├── menu_post_install.sh
|
||||
│ └── ...
|
||||
├── post_install/
|
||||
├── vm/
|
||||
├── lxc/
|
||||
├── storage/
|
||||
├── share/
|
||||
├── utilities/
|
||||
├── global/
|
||||
└── gpu_tpu/
|
||||
|
||||
/usr/local/bin/
|
||||
└── menu
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Consideraciones Especiales
|
||||
|
||||
### Scripts Externos de la Comunidad
|
||||
Mantener URLs remotas para:
|
||||
- Proxmox VE Helper-Scripts (community-scripts)
|
||||
- xshok-proxmox scripts
|
||||
|
||||
### ProxMenux Monitor
|
||||
El AppImage se mantiene descargable desde GitHub durante la instalación inicial (10 MB).
|
||||
|
||||
### Sistema de Actualizaciones
|
||||
Opciones:
|
||||
1. Deshabilitar completamente
|
||||
2. Mostrar mensaje para ejecutar `install_proxmenux.sh` manualmente
|
||||
3. Sistema híbrido (check opcional remoto)
|
||||
|
||||
---
|
||||
|
||||
## Checklist de Validación
|
||||
|
||||
- [x] Backup completo del repositorio
|
||||
- [ ] Conversión automática ejecutada
|
||||
- [ ] `install_proxmenux.sh` modificado
|
||||
- [ ] `menu` modificado
|
||||
- [ ] Scripts de menús verificados
|
||||
- [ ] Sin referencias a githubusercontent.com
|
||||
- [ ] Sin llamadas curl a REPO_URL
|
||||
- [ ] Instalación local funcional
|
||||
- [ ] Navegación por todos los menús OK
|
||||
- [ ] Ejecución offline confirmada
|
||||
|
||||
---
|
||||
|
||||
**Total de archivos a modificar**: 47
|
||||
**Líneas estimadas**: ~150-200
|
||||
**Tiempo estimado**: 2-4 horas
|
||||
**Riesgo**: Medio (requiere testing)
|
||||
**Beneficio**: Sistema completamente offline
|
||||
Reference in New Issue
Block a user