From 2a0b298ae58eced13c96d35a2f86d554793acb96 Mon Sep 17 00:00:00 2001 From: code78 Date: Sat, 1 Nov 2025 03:01:51 +0000 Subject: [PATCH 001/114] 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 --- docs/01.PROXMENUX_REVIEW.md | 512 ++++++++++++++++++++ docs/02.GUIA_MODIFICACION_OFFLINE.md | 699 +++++++++++++++++++++++++++ 2 files changed, 1211 insertions(+) create mode 100644 docs/01.PROXMENUX_REVIEW.md create mode 100644 docs/02.GUIA_MODIFICACION_OFFLINE.md diff --git a/docs/01.PROXMENUX_REVIEW.md b/docs/01.PROXMENUX_REVIEW.md new file mode 100644 index 0000000..985b474 --- /dev/null +++ b/docs/01.PROXMENUX_REVIEW.md @@ -0,0 +1,512 @@ + +--- + +# **Análisis Completo del proyecto ProxMenux** + +## **1. Estructura General del Proyecto** + +### **Archivos Principales** +- **[install_proxmenux.sh](cci:7://file:///home/debian/src/ProxMenuxDotDeb/install_proxmenux.sh:0:0-0:0)**: Script de instalación principal (723 líneas) +- **[menu](cci:7://file:///home/debian/src/ProxMenuxDotDeb/menu:0:0-0:0)**: Script principal que se instala como comando del sistema (93 líneas) +- **[version.txt](cci:7://file:///home/debian/src/ProxMenuxDotDeb/version.txt:0:0-0:0)**: Control de versiones (actual: 1.1.7) + +### **Directorios Principales** +``` +ProxMenuxDotDeb/ +├── scripts/ # 122 archivos de scripts bash +│ ├── menus/ # 13 scripts de menús +│ ├── lxc/ # 6 scripts para contenedores LXC +│ ├── vm/ # 13 scripts para máquinas virtuales +│ ├── storage/ # 9 scripts de almacenamiento +│ ├── share/ # 12 scripts para compartir recursos +│ ├── utilities/ # 6 utilidades del sistema +│ ├── global/ # 10 funciones comunes +│ ├── backup_restore/ # 6 scripts de respaldo +│ ├── post_install/ # 3 scripts post-instalación +│ └── gpu_tpu/ # Scripts para hardware gráfico +├── web/ # 136 archivos - Dashboard Next.js +├── AppImage/ # 54 archivos - ProxMenux Monitor +├── json/ # Archivos de caché de traducciones +├── lang/ # Archivos de idioma +├── guides/ # 5 guías de usuario +└── images/ # 7 imágenes del proyecto +``` + +--- + +## **2. Flujo de Instalación** + +### **Script: [install_proxmenux.sh](cci:7://file:///home/debian/src/ProxMenuxDotDeb/install_proxmenux.sh:0:0-0:0)** + +**Fase 1: Inicialización** +- Verifica permisos root (línea 716-719) +- Carga [utils.sh](cci:7://file:///home/debian/src/ProxMenuxDotDeb/scripts/utils.sh:0:0-0:0) desde GitHub (línea 54-57) +- Limpia archivos corruptos de configuración (línea 59-68) + +**Fase 2: Detección de Instalación Existente** +- Función [check_existing_installation()](cci:1://file:///home/debian/src/ProxMenuxDotDeb/install_proxmenux.sh:70:0-106:1) (línea 71-107) +- Detecta 4 tipos: `none`, `normal`, `translation`, `unknown` +- Verifica entorno virtual Python en `/opt/googletrans-env` +- Verifica configuración de idioma en `/usr/local/share/proxmenux/config.json` + +**Fase 3: Selección de Versión** +- **Versión Normal** (opción 1): + - Dependencias: `dialog`, `curl`, `jq` + - Solo inglés + - Más ligera y rápida + +- **Versión con Traducción** (opción 2): + - Dependencias adicionales: `python3`, `python3-venv`, `python3-pip` + - Instala `googletrans==4.0.0-rc1` en entorno virtual + - Soporte multiidioma: en, es, fr, de, it, pt + - **Nota**: No compatible con Proxmox VE 9+ (línea 639-658) + +**Fase 4: Instalación Normal** ([install_normal_version()](cci:1://file:///home/debian/src/ProxMenuxDotDeb/install_proxmenux.sh:402:0-484:1)) +1. Instala dependencias básicas +2. Crea directorios: + - `/usr/local/bin` (ejecutables) + - `/usr/local/share/proxmenux` (archivos del sistema) +3. Descarga desde GitHub: + - `utils.sh` → `/usr/local/share/proxmenux/utils.sh` + - `menu` → `/usr/local/bin/menu` + - `version.txt` → `/usr/local/share/proxmenux/version.txt` +4. Instala ProxMenux Monitor (AppImage) + +**Fase 5: Instalación con Traducción** (`install_translation_version()`) +- Pasos adicionales: + - Selector de idioma interactivo (línea 234-273) + - Crea entorno virtual Python en `/opt/googletrans-env` + - Instala googletrans con pip + - Descarga `cache.json` con traducciones precargadas + - Sistema de caché para reducir llamadas a la API de traducción + +**Fase 6: ProxMenux Monitor** +- Descarga AppImage desde GitHub (línea 317-360) +- Verifica checksum SHA256 (línea 333-351) +- Crea servicio systemd `/etc/systemd/system/proxmenux-monitor.service` +- Puerto por defecto: 8008 +- Se ejecuta como usuario root +- Auto-inicio en boot + +--- + +## **3. Funcionamiento del Comando `menu`** + +### **Script Principal: `/usr/local/bin/menu`** + +**Flujo de Ejecución:** + +1. **Carga de Configuración** (línea 33-44): + ```bash + REPO_URL="https://raw.githubusercontent.com/MacRimi/ProxMenux/main" + BASE_DIR="/usr/local/share/proxmenux" + source "$UTILS_FILE" + ``` + +2. **Sistema de Traducción** (línea 89-92): + - Carga idioma desde `config.json` + - Inicializa caché de traducciones + - Función `translate()` en `utils.sh` + +3. **Verificación de Actualizaciones** (línea 48-80): + - Compara versión local vs remota + - Prompt interactivo para actualizar + - Descarga y ejecuta nuevo `install_proxmenux.sh` si hay actualización + +4. **Ejecución del Menú Principal** (línea 84-86): + ```bash + exec bash <(curl -fsSL "$REPO_URL/scripts/menus/main_menu.sh") + ``` + +**Importante**: El comando `menu` **NO ejecuta scripts locales**, siempre descarga desde GitHub. + +--- + +## **4. Sistema de Menús** + +### **Menú Principal: `scripts/menus/main_menu.sh`** + +**Compatibilidad PVE 9** (línea 26-64): +- Detecta versión de Proxmox +- Si PVE 9+ y tiene traducciones instaladas → fuerza reinstalación en versión normal +- Previene errores de compatibilidad + +**Opciones del Menú** (línea 97-111): +``` +1. Settings post-install Proxmox → menu_post_install.sh +2. Hardware: GPUs and Coral-TPU → hw_grafics_menu.sh +3. Create VM from template → create_vm_menu.sh +4. Disk and Storage Manager → storage_menu.sh +5. Mount and Share Manager → share_menu.sh +6. Proxmox VE Helper Scripts → menu_Helper_Scripts.sh +7. Network Management → network_menu.sh +8. Utilities and Tools → utilities_menu.sh +h. Help and Info Commands → help_info_menu.sh +s. Settings → config_menu.sh +0. Exit +``` + +**Patrón de Ejecución**: +```bash +exec bash <(curl -s "$REPO_URL/scripts/menus/submenu.sh") +``` + +Todos los menús descargan y ejecutan scripts desde GitHub en tiempo real. + +--- + +## **5. Scripts Locales vs Remotos** + +### **Estado Actual** +- **Scripts locales**: Están presentes en el repositorio (122 archivos) +- **Ejecución**: Siempre desde GitHub mediante `curl` +- **Ventaja actual**: Actualizaciones automáticas sin reinstalar +- **Desventaja**: Requiere conexión a internet constante + +### **Scripts Principales Disponibles Localmente** + +**Gestión de VMs** (`scripts/vm/`): +- `create_vm.sh` - Crear VMs +- `synology.sh` (39KB) - Instalación Synology DSM +- `zimaos.sh` (40KB) - Instalación ZimaOS +- `uupdump_creator.sh` - Creador de ISOs Windows +- `select_windows_iso.sh`, `select_linux_iso.sh`, `select_nas_iso.sh` + +**Gestión de LXC** (`scripts/lxc/`): +- `lxc-manual-guide.sh` - Guía manual +- `lxc-privileged-to-unprivileged.sh` +- `lxc-unprivileged-to-privileged.sh` + +**Almacenamiento** (`scripts/storage/`): +- `disk-passthrough.sh` - Passthrough disco a VM +- `disk-passthrough_ct.sh` - Passthrough disco a LXC (22KB) +- `import-disk-image.sh` - Importar imágenes +- `format-disk.sh`, `mount-disk-on-host.sh` + +**Compartir Recursos** (`scripts/share/`): +- `lxc-mount-manager_minimal.sh` (35KB) - Gestión mount points +- `nfs_host.sh` (35KB) - Servidor NFS en host +- `samba_host.sh` (52KB) - Servidor Samba en host +- `nfs_client.sh`, `samba_client.sh` - Clientes en LXC +- `local-shared-manager.sh` - Directorios compartidos locales + +**Post-Instalación** (`scripts/post_install/`): +- `auto_post_install.sh` (29KB) - Automatizado sin interacción +- `customizable_post_install.sh` (148KB) - Personalizable +- `uninstall-tools.sh` (34KB) - Desinstalador + +**Utilidades** (`scripts/utilities/`): +- `upgrade_pve8_to_pve9.sh` (35KB) - Upgrade PVE 8→9 +- `system_utils.sh` (20KB) - Instalador de utilidades +- `proxmox_update.sh` - Actualización de Proxmox + +**Red** (`scripts/menus/network_menu.sh`): +- 43KB de funcionalidades de red +- Optimizaciones para LXC+NFS + +**Global** (`scripts/global/`): +- `update-pve.sh`, `update-pve8.sh`, `update-pve9_2.sh` +- `remove-banner-pve8.sh`, `remove-banner-pve9.sh` +- `share-common.func` (30KB) - Funciones compartidas + +--- + +## **6. Sistema de Utilidades: `utils.sh`** + +### **Funciones Principales** + +**Interfaz Visual** (línea 50-71): +- Definición de colores ANSI +- Códigos de estilo para terminal +- Spinner animado (línea 75-88) + +**Mensajes Estandarizados**: +- `msg_info()` - Info con spinner +- `msg_ok()` - Éxito (checkmark verde) +- `msg_error()` - Error (rojo) +- `msg_warn()` - Advertencia (amarillo) +- `msg_title()` - Títulos +- `type_text()` - Efecto máquina de escribir + +**Sistema de Traducción** (línea 232-305): +```bash +translate() { + # Si idioma es "en" → retorna texto original + # Busca en caché local (cache.json) + # Si no existe → llama a googletrans vía Python + # Guarda en caché para futuras traducciones + # Limpia prefijos de contexto +} +``` + +**Contexto de Traducción** (línea 48): +```bash +TRANSLATION_CONTEXT="Context: Technical message for Proxmox and IT. Translate:" +``` + +**Logo ASCII** (línea 314-400): +- Dos versiones: terminal noVNC y SSH +- Detección automática del entorno +- Diseño en ASCII art con colores + +--- + +## **7. ProxMenux Monitor** + +### **Componente Web (AppImage)** + +**Tecnología**: +- **Frontend**: Next.js 14, React 18, TypeScript +- **UI**: Radix UI + shadcn/ui + Tailwind CSS +- **Gráficos**: Recharts +- **Backend**: Flask (Python) para recolección de datos del sistema +- **Empaquetado**: AppImage (10.3 MB) + +**Características**: +- Dashboard en tiempo real +- Monitoreo de CPU, RAM, temperatura +- Estado de VMs y LXC containers +- Gestión de almacenamiento visual +- Estadísticas de red +- Logs del sistema +- Tema oscuro/claro +- Responsive design +- Puerto: 8008 + +**Servicio Systemd**: +```ini +[Unit] +Description=ProxMenux Monitor - Web Dashboard +After=network.target + +[Service] +Type=simple +User=root +WorkingDirectory=/usr/local/share/proxmenux +ExecStart=/usr/local/share/proxmenux/ProxMenux-Monitor.AppImage +Restart=on-failure +RestartSec=10 +Environment="PORT=8008" +``` + +**Estado**: Se instala automáticamente en ambas versiones (normal y traducción) + +--- + +## **8. Sistema de Configuración** + +### **Archivos de Configuración** + +**`/usr/local/share/proxmenux/config.json`**: +- Estado de instalación de componentes +- Idioma seleccionado +- Timestamps de instalación +- Estados: `installed`, `already_installed`, `failed` + +**Componentes Rastreados** (línea 201): +```json +{ + "dialog": {"status": "installed", "timestamp": "..."}, + "curl": {"status": "already_installed", "timestamp": "..."}, + "jq": {"status": "installed", "timestamp": "..."}, + "python3": {"status": "installed", "timestamp": "..."}, + "virtual_environment": {"status": "created", "timestamp": "..."}, + "googletrans": {"status": "installed", "timestamp": "..."}, + "proxmenux_monitor": {"status": "installed", "timestamp": "..."}, + "language": "es" +} +``` + +**`/usr/local/share/proxmenux/cache.json`**: +- Traducciones cacheadas (100 KB) +- Formato: `{"texto_original": {"es": "traducción", "fr": "traduction"}}` +- Reduce llamadas a Google Translate API + +**`/usr/local/share/proxmenux/installed_tools.json`**: +- Registro de herramientas post-instalación +- Usado por el desinstalador + +--- + +## **9. Funcionalidades Destacadas** + +### **Post-Instalación Automatizada** +- **Optimizaciones de repositorios**: Limpia duplicados, configura repos gratuitos +- **Eliminación de banner de suscripción**: Con respaldo y reversión +- **Optimización de memoria y kernel**: Ajustes según RAM disponible +- **Log2RAM**: Instalación automática en SSD/NVMe +- **Network tuning**: Optimización de stack de red +- **Límites del sistema**: Aumenta límites de archivos y procesos +- **Configuración de journald**: Ajustada para Log2RAM +- **Entropía**: Mejora generación de números aleatorios +- **Aliases bash**: Personalización del entorno + +### **Gestión de Compartición de Recursos** +**Enfoque**: Mount Points LXC (Host ↔ Container) +- Detección automática de tipo de filesystem +- Mapeo UID/GID para contenedores unprivileged +- Visualización de mount points existentes +- Eliminación segura con verificación + +**Configuraciones disponibles**: +- NFS: Host, Client LXC, Server LXC +- Samba: Host, Client LXC, Server LXC +- Directorios locales compartidos + +### **Hardware Especializado** +- **Coral TPU**: Instalación de drivers compatible con PVE 8 y 9 +- **GPUs**: Passthrough y configuración para VMs y LXC +- **iGPU**: Configuración para contenedores LXC + +### **Upgrade PVE 8 → 9** +- Script de 35 KB con verificaciones exhaustivas +- Guía manual interactiva +- Checker de compatibilidad + +--- + +## **10. Arquitectura de Ejecución** + +### **Patrón de Descarga Dinámica** + +**Todos los scripts siguen este patrón**: +```bash +exec bash <(curl -s "$REPO_URL/scripts/path/to/script.sh") +``` + +**Ventajas**: +- ✅ Usuarios siempre tienen la última versión +- ✅ No requiere reinstalación para actualizaciones +- ✅ Hotfixes inmediatos +- ✅ Control centralizado de versiones + +**Consideraciones**: +- ⚠️ Requiere internet en cada ejecución +- ⚠️ Dependencia de disponibilidad de GitHub +- ⚠️ No funciona offline +- ⚠️ Los scripts locales del repo no se usan directamente + +### **Sistema de Versionado** +- `version.txt` en repo: versión remota +- `/usr/local/share/proxmenux/version.txt`: versión local instalada +- Check en cada ejecución del comando `menu` +- Prompt para actualizar si hay nueva versión + +--- + +## **11. Flujo de Navegación** + +``` +Comando: menu + ↓ +Verifica actualizaciones + ↓ +Carga utils.sh y traducciones + ↓ +Descarga main_menu.sh desde GitHub + ↓ +Usuario selecciona opción + ↓ +Descarga submenu correspondiente desde GitHub + ↓ +Usuario selecciona acción + ↓ +Descarga y ejecuta script específico desde GitHub + ↓ +Retorna al menú anterior +``` + +**Ejemplo de navegación**: +``` +menu → main_menu.sh + → opción 5: share_menu.sh + → opción 4: lxc-mount-manager_minimal.sh (35KB) + → Ejecuta acciones + → Retorna a share_menu.sh + → opción 0: Retorna a main_menu.sh + → opción 0: Exit +``` + +--- + +## **12. Integración con Comunidad** + +### **Scripts de la Comunidad Integrados** + +**Proxmox VE Helper-Scripts**: +- Post-install script oficial +- Ejecutado desde: `https://github.com/community-scripts/ProxmoxVE` + +**Xshok-proxmox** (fork): +- Post-install alternativo +- Descarga desde fork de MacRimi + +**Elementos compartidos**: +- Funciones de `utils.sh` basadas en Helper-Scripts +- Misma filosofía de mensajes estandarizados +- Licencia MIT compatible + +--- + +## **13. Sistema de Desinstalación** + +### **Función: `uninstall_proxmenux()`** (línea 109-161) + +**Proceso**: +1. Confirmación interactiva (whiptail) +2. Desinstala googletrans y entorno virtual Python +3. Selector de dependencias a eliminar (python3, python3-venv, pip) +4. Elimina `/usr/local/bin/menu` +5. Elimina `/usr/local/share/proxmenux/` +6. Restaura `.bashrc` desde backup +7. Restaura `/etc/motd` desde backup + +**Tool-specific uninstaller**: `scripts/post_install/uninstall-tools.sh` +- Lee `installed_tools.json` +- Permite desinstalar herramientas individualmente +- Restaura configuraciones originales + +--- + +## **14. Estructura de Archivos JSON** + +### **`json/cache.json`** (100 KB) +Traducciones precargadas para acelerar el sistema + +### **`json/helpers_cache.json`** (273 KB) +Caché extendido, probablemente para Helper Scripts + +### **`lang/cache.json`** (5.5 KB) +Caché de idiomas específico + +### **`lang/en.lang`** y **`lang/es.lang`** +Archivos de idioma estáticos (4-5 KB cada uno) + +--- + +## **15. Resumen de Componentes** + +| Componente | Ubicación | Función | +|------------|-----------|---------| +| **Instalador** | `install_proxmenux.sh` | Instalación inicial y actualizaciones | +| **Comando principal** | `/usr/local/bin/menu` | Punto de entrada del usuario | +| **Utilidades** | `/usr/local/share/proxmenux/utils.sh` | Funciones compartidas | +| **Configuración** | `/usr/local/share/proxmenux/config.json` | Estado del sistema | +| **Caché traducciones** | `/usr/local/share/proxmenux/cache.json` | Traducciones cacheadas | +| **Entorno Python** | `/opt/googletrans-env/` | Traducción (solo versión translation) | +| **Monitor** | `/usr/local/share/proxmenux/ProxMenux-Monitor.AppImage` | Dashboard web | +| **Servicio Monitor** | `/etc/systemd/system/proxmenux-monitor.service` | Servicio systemd | +| **Scripts** | GitHub (descarga dinámica) | Todos los scripts funcionales | + +--- + +## **Conclusión** + +ProxMenuxDotDeb es un **sistema modular de gestión de Proxmox VE** que utiliza una arquitectura híbrida: + +- **Núcleo local**: Comando `menu`, utilidades, sistema de configuración +- **Scripts remotos**: Toda la funcionalidad se descarga dinámicamente desde GitHub +- **Dashboard web**: AppImage independiente con Next.js + Flask +- **Sistema de traducción**: Opcional, basado en Python + googletrans + caché + +El proyecto tiene **122 scripts bash** en el repositorio local que **podrían ejecutarse localmente**, pero actualmente **todos se descargan desde GitHub en tiempo de ejecución**. Esta arquitectura prioriza mantener a los usuarios actualizados sobre la ejecución offline. \ No newline at end of file diff --git a/docs/02.GUIA_MODIFICACION_OFFLINE.md b/docs/02.GUIA_MODIFICACION_OFFLINE.md new file mode 100644 index 0000000..9f6b4b8 --- /dev/null +++ b/docs/02.GUIA_MODIFICACION_OFFLINE.md @@ -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 From 10603900dfb9940637073ec139cd8cf68f076077 Mon Sep 17 00:00:00 2001 From: code78 Date: Sat, 1 Nov 2025 23:33:25 +0000 Subject: [PATCH 002/114] update: Progress status --- docs/02.GUIA_MODIFICACION_OFFLINE.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/02.GUIA_MODIFICACION_OFFLINE.md b/docs/02.GUIA_MODIFICACION_OFFLINE.md index 9f6b4b8..ba07924 100644 --- a/docs/02.GUIA_MODIFICACION_OFFLINE.md +++ b/docs/02.GUIA_MODIFICACION_OFFLINE.md @@ -679,11 +679,11 @@ Opciones: ## 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 +- [ok] Backup completo del repositorio +- [ok] Conversión automática ejecutada +- [ok] `install_proxmenux.sh` modificado +- [ok] `menu` modificado +- [ip] Scripts de menús verificados - [ ] Sin referencias a githubusercontent.com - [ ] Sin llamadas curl a REPO_URL - [ ] Instalación local funcional From 05e81053e02e3a901e7140222b3981e9f4d76c02 Mon Sep 17 00:00:00 2001 From: code78 Date: Sat, 1 Nov 2025 23:47:45 +0000 Subject: [PATCH 003/114] feat: switch to local file installation and improve monitor setup - Replaced remote file downloads with local file copying for more reliable installation - Added proper cleanup of existing monitor service before reinstallation - Enhanced error handling and logging for monitor service startup - Improved SHA256 verification for monitor AppImage - Added copying of install script and all utility scripts to base directory - Updated progress messages to be more descriptive and accurate - Increased monitor --- install_proxmenux.sh | 102 ++++++++++++++++++++++--------------------- 1 file changed, 52 insertions(+), 50 deletions(-) mode change 100644 => 100755 install_proxmenux.sh diff --git a/install_proxmenux.sh b/install_proxmenux.sh old mode 100644 new mode 100755 index 58f6043..e0690d4 --- a/install_proxmenux.sh +++ b/install_proxmenux.sh @@ -34,8 +34,8 @@ # ========================================================== # Configuration ============================================ -REPO_URL="https://raw.githubusercontent.com/MacRimi/ProxMenux/main" -UTILS_URL="https://raw.githubusercontent.com/MacRimi/ProxMenux/main/scripts/utils.sh" +LOCAL_SCRIPTS="/usr/local/share/proxmenux/scripts" +# UTILS_URL - No longer used in local version (now loaded from ./scripts/utils.sh) INSTALL_DIR="/usr/local/bin" BASE_DIR="/usr/local/share/proxmenux" CONFIG_FILE="$BASE_DIR/config.json" @@ -51,8 +51,11 @@ MONITOR_INSTALL_PATH="$BASE_DIR/ProxMenux-Monitor.AppImage" MONITOR_SERVICE_FILE="/etc/systemd/system/proxmenux-monitor.service" MONITOR_PORT=8008 -if ! source <(curl -sSf "$UTILS_URL"); then - echo "Error: Could not load utils.sh from $UTILS_URL" +# Load utils.sh from local repository +if [[ -f "./scripts/utils.sh" ]]; then + source "./scripts/utils.sh" +else + echo "Error: Could not load utils.sh from local path" exit 1 fi @@ -315,6 +318,8 @@ get_server_ip() { } install_proxmenux_monitor() { + systemctl stop proxmenux-monitor 2>/dev/null || true + # Check if URL is accessible if ! wget --spider -q "$MONITOR_APPIMAGE_URL" 2>/dev/null; then msg_warn "ProxMenux Monitor AppImage not available at: $MONITOR_APPIMAGE_URL" @@ -323,7 +328,7 @@ install_proxmenux_monitor() { fi # Download AppImage silently - if ! wget -q -O "$MONITOR_INSTALL_PATH" "$MONITOR_APPIMAGE_URL" 2>&1; then + if ! wget -q -O "$MONITOR_INSTALL_PATH" "$MONITOR_APPIMAGE_URL" 2>/dev/null; then msg_warn "Failed to download ProxMenux Monitor from GitHub." msg_info "You can install it manually later when available." return 1 @@ -337,7 +342,7 @@ install_proxmenux_monitor() { rm -f "$sha256_file" else # Verify SHA256 silently - local expected_hash=$(cat "$sha256_file" | awk '{print $1}') + local expected_hash=$(cat "$sha256_file" | grep -Eo '^[a-f0-9]+' | tr -d '\n') local actual_hash=$(sha256sum "$MONITOR_INSTALL_PATH" | awk '{print $1}') if [ "$expected_hash" != "$actual_hash" ]; then @@ -386,7 +391,7 @@ EOF systemctl start proxmenux-monitor.service > /dev/null 2>&1 # Wait a moment for service to start - sleep 2 + sleep 3 # Check if service is running if systemctl is-active --quiet proxmenux-monitor.service; then @@ -394,7 +399,10 @@ EOF update_config "proxmenux_monitor" "installed" return 0 else - msg_warn "ProxMenux Monitor service failed to start. Check logs with: journalctl -u proxmenux-monitor" + msg_warn "ProxMenux Monitor service failed to start." + msg_info "Check logs with: journalctl -u proxmenux-monitor -n 20" + msg_info "Check status with: systemctl status proxmenux-monitor" + update_config "proxmenux_monitor" "failed" return 1 fi } @@ -404,7 +412,7 @@ install_normal_version() { local total_steps=4 # Increased from 3 to 4 for monitor installation local current_step=1 - show_progress $current_step $total_steps "Installing basic dependencies" + show_progress $current_step $total_steps "Installing basic dependencies." if ! dpkg -l | grep -qw "jq"; then msg_info "Installing jq..." @@ -454,26 +462,22 @@ install_normal_version() { msg_ok "Directories and configuration created." ((current_step++)) - show_progress $current_step $total_steps "Downloading necessary files" - - FILES=( - "$UTILS_FILE $REPO_URL/scripts/utils.sh" - "$INSTALL_DIR/$MENU_SCRIPT $REPO_URL/$MENU_SCRIPT" - "$LOCAL_VERSION_FILE $REPO_URL/version.txt" - ) - - for file in "${FILES[@]}"; do - IFS=" " read -r dest url <<< "$file" - msg_info "Downloading ${dest##*/}..." - sleep 2 - if wget -qO "$dest" "$url"; then - msg_ok "${dest##*/} downloaded successfully." - else - msg_error "Failed to download ${dest##*/}. Check your Internet connection." - return 1 - fi - done + show_progress $current_step $total_steps "Copying necessary files" + # Note: Previous version downloaded from GitHub, now using local files + ### Copy files from local scripts directory + cp "./scripts/utils.sh" "$UTILS_FILE" + cp "./menu" "$INSTALL_DIR/$MENU_SCRIPT" + cp "./version.txt" "$LOCAL_VERSION_FILE" + cp "./install_proxmenux.sh" "$BASE_DIR/install_proxmenux.sh" + + mkdir -p "$BASE_DIR/scripts" + cp -r "./scripts/"* "$BASE_DIR/scripts/" + chmod -R +x "$BASE_DIR/scripts/" + chmod +x "$BASE_DIR/install_proxmenux.sh" + msg_ok "Necessary files created." + ### + chmod +x "$INSTALL_DIR/$MENU_SCRIPT" ((current_step++)) @@ -482,6 +486,8 @@ install_normal_version() { if install_proxmenux_monitor; then create_monitor_service fi + + msg_ok "ProxMenux Normal Version installation completed successfully." } #################################################### @@ -575,32 +581,26 @@ install_translation_version() { deactivate ((current_step++)) - show_progress $current_step $total_steps "Downloading necessary files" + show_progress $current_step $total_steps "Copying necessary files" mkdir -p "$BASE_DIR" mkdir -p "$INSTALL_DIR" - FILES=( - "$CACHE_FILE $REPO_URL/json/cache.json" - "$UTILS_FILE $REPO_URL/scripts/utils.sh" - "$INSTALL_DIR/$MENU_SCRIPT $REPO_URL/$MENU_SCRIPT" - "$LOCAL_VERSION_FILE $REPO_URL/version.txt" - ) + ### Copy files from local scripts directory + cp "./json/cache.json" "$CACHE_FILE" + msg_ok "Cache file copied with translations." - for file in "${FILES[@]}"; do - IFS=" " read -r dest url <<< "$file" - msg_info "Downloading ${dest##*/}..." - sleep 2 - if wget -qO "$dest" "$url"; then - msg_ok "${dest##*/} downloaded successfully." - if [[ "$dest" == "$CACHE_FILE" ]]; then - msg_ok "Cache file updated with latest translations." - fi - else - msg_error "Failed to download ${dest##*/}. Check your Internet connection." - return 1 - fi - done + cp "./scripts/utils.sh" "$UTILS_FILE" + cp "./menu" "$INSTALL_DIR/$MENU_SCRIPT" + cp "./version.txt" "$LOCAL_VERSION_FILE" + cp "./install_proxmenux.sh" "$BASE_DIR/install_proxmenux.sh" + + mkdir -p "$BASE_DIR/scripts" + cp -r "./scripts/"* "$BASE_DIR/scripts/" + chmod -R +x "$BASE_DIR/scripts/" + chmod +x "$BASE_DIR/install_proxmenux.sh" + msg_ok "Necessary files created." + ### chmod +x "$INSTALL_DIR/$MENU_SCRIPT" @@ -610,6 +610,8 @@ install_translation_version() { if install_proxmenux_monitor; then create_monitor_service fi + + msg_ok "ProxMenux Translation Version installation completed successfully." } #################################################### @@ -703,7 +705,7 @@ install_proxmenu() { if systemctl is-active --quiet proxmenux-monitor.service; then local server_ip=$(get_server_ip) - echo -e "${GN}🌐 $(translate "ProxMenux Monitor activated")${CL}: ${BL}http://${server_ip}:${MONITOR_PORT}${CL}" + echo -e "${GN}🌐 $(translate "ProxMenux Monitor activated")${CL}: ${BL}http://${server_ip}:${MONITOR_PORT}${CL}" echo fi From 8a371c26de82a87763ea75f43238d8f2debacd6c Mon Sep 17 00:00:00 2001 From: cod378 Date: Sun, 2 Nov 2025 02:51:24 +0000 Subject: [PATCH 004/114] refactor: switch from remote to local script execution - Changed script loading from remote URL to local directory path for offline usage - Updated REPO_URL to LOCAL_SCRIPTS path (/usr/local/share/proxmenux/scripts) - Disabled check_updates function since it's not applicable for local version - Added comments explaining update functionality will be handled via .deb package in future --- menu | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/menu b/menu index 11ea45a..b1ff99e 100644 --- a/menu +++ b/menu @@ -31,7 +31,7 @@ # Configuration ============================================ -REPO_URL="https://raw.githubusercontent.com/MacRimi/ProxMenux/main" +LOCAL_SCRIPTS="/usr/local/share/proxmenux/scripts" BASE_DIR="/usr/local/share/proxmenux" CONFIG_FILE="$BASE_DIR/config.json" CACHE_FILE="$BASE_DIR/cache.json" @@ -44,7 +44,10 @@ if [[ -f "$UTILS_FILE" ]]; then fi # ========================================================= - +# For now, update is not available in the local version. +# Take in mind that in future versions, updates must be +# a warning to update the .deb package +# ========================================================= check_updates() { local INSTALL_SCRIPT="$BASE_DIR/install_proxmenux.sh" @@ -80,13 +83,13 @@ check_updates() { } - main_menu() { - exec bash <(curl -fsSL "$REPO_URL/scripts/menus/main_menu.sh") + exec bash "$LOCAL_SCRIPTS/menus/main_menu.sh" } load_language initialize_cache -check_updates +# Check updates doesn't make sense in offline mode +# check_updates main_menu From 3c47f84a240ec2853e37ecf5c9b8c6c953461658 Mon Sep 17 00:00:00 2001 From: cod378 Date: Sun, 2 Nov 2025 02:55:19 +0000 Subject: [PATCH 005/114] refactor: switch from remote repo to local scripts path - Changed repository URL reference from GitHub to local scripts directory (/usr/local/share/proxmenux/scripts) - Fixed spacing in info2 message formatting by adding space after HOLD variable - Simplified script dependencies to use local installation instead of remote fetching --- scripts/utils.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/utils.sh b/scripts/utils.sh index 0c216d2..1a53616 100644 --- a/scripts/utils.sh +++ b/scripts/utils.sh @@ -34,7 +34,7 @@ # ========================================================== # Repository and directory structure -REPO_URL="https://raw.githubusercontent.com/MacRimi/ProxMenux/main" +LOCAL_SCRIPTS="/usr/local/share/proxmenux/scripts" INSTALL_DIR="/usr/local/bin" BASE_DIR="/usr/local/share/proxmenux" CONFIG_FILE="$BASE_DIR/config.json" @@ -133,7 +133,7 @@ msg_info() { # Display info2 message msg_info2() { local msg="$1" - echo -e "${TAB}${BOLD}${YW}${HOLD}${msg}${CL}" + echo -e "${TAB}${BOLD}${YW}${HOLD} ${msg}${CL}" } # Display info message with spinner From fa93b43c32d04b342255aa1d5770d88e94d10c33 Mon Sep 17 00:00:00 2001 From: cod378 Date: Sun, 2 Nov 2025 02:59:33 +0000 Subject: [PATCH 006/114] feat: switch telegram notifier to use local scripts - Changed script source from GitHub repository to local directory (/usr/local/share/proxmenux/scripts) - Updated path configuration to ensure consistent local file access - Removed dependency on external repository for improved reliability and security --- scripts/telegram-notifier.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/telegram-notifier.sh b/scripts/telegram-notifier.sh index 2f98233..d5ee816 100644 --- a/scripts/telegram-notifier.sh +++ b/scripts/telegram-notifier.sh @@ -2,7 +2,7 @@ # Configuration ============================================ -REPO_URL="https://raw.githubusercontent.com/MacRimi/ProxMenux/main" +LOCAL_SCRIPTS="/usr/local/share/proxmenux/scripts" BASE_DIR="/usr/local/share/proxmenux" UTILS_FILE="$BASE_DIR/utils.sh" VENV_PATH="/opt/googletrans-env" From 4590be6d425ae5ea6aec7222a8b068249aba064c Mon Sep 17 00:00:00 2001 From: cod378 Date: Sun, 2 Nov 2025 03:22:54 +0000 Subject: [PATCH 007/114] fix: replace remote script loading with local file execution --- scripts/repair_network.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/repair_network.sh b/scripts/repair_network.sh index 4a277d7..2ececed 100644 --- a/scripts/repair_network.sh +++ b/scripts/repair_network.sh @@ -23,7 +23,7 @@ # ========================================================== # Configuration ============================================ -REPO_URL="https://raw.githubusercontent.com/MacRimi/ProxMenux/main" +LOCAL_SCRIPTS="/usr/local/share/proxmenux/scripts" BASE_DIR="/usr/local/share/proxmenux" UTILS_FILE="$BASE_DIR/utils.sh" VENV_PATH="/opt/googletrans-env" @@ -201,8 +201,8 @@ show_main_menu() { 2) show_ip_info ;; - 3) exec bash <(curl -s "$REPO_URL/scripts/menus/main_menu.sh") ;; - *) exec bash <(curl -s "$REPO_URL/scripts/menus/main_menu.sh") ;; + 3) exec bash "$LOCAL_SCRIPTS/menus/main_menu.sh" ;; + *) exec bash "$LOCAL_SCRIPTS/menus/main_menu.sh" ;; esac done From 8744620220ccd5986ff754d9caaf31532a9963e1 Mon Sep 17 00:00:00 2001 From: cod378 Date: Sun, 2 Nov 2025 03:24:26 +0000 Subject: [PATCH 008/114] feat: improve log2ram installation and system checks MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Enhanced log2ram size calculation to support both MB and GB configurations - Updated RAM detection to use MB-level precision before converting to GB - Fixed typos in status messages ("successfull" → "successful") - Switched from remote repo URL to local scripts directory for better reliability - Added registration of LVM repair tool after successful header checks - Improved log2ram monitoring script to properly handle different size units (M --- scripts/auto_post_install.sh | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/scripts/auto_post_install.sh b/scripts/auto_post_install.sh index fbf4253..5462103 100644 --- a/scripts/auto_post_install.sh +++ b/scripts/auto_post_install.sh @@ -31,12 +31,12 @@ # - Translation support: Multi-language compatible through ProxMenux framework # - Rollback compatibility: All optimizations can be reversed using the uninstall script # -# This script is based on the post-install script cutotomizable +# This script is based on the post-install script customizable # ========================================================== # Configuration -REPO_URL="https://raw.githubusercontent.com/MacRimi/ProxMenux/main" +LOCAL_SCRIPTS="/usr/local/share/proxmenux/scripts" BASE_DIR="/usr/local/share/proxmenux" UTILS_FILE="$BASE_DIR/utils.sh" VENV_PATH="/opt/googletrans-env" @@ -99,7 +99,7 @@ lvm_repair_check() { done msg_ok "$(translate "LVM PV headers check completed")" - + register_tool "lvm_repair" true } # ========================================================== @@ -257,7 +257,7 @@ apt_upgrade() { if [ "$total_packages" -eq 0 ]; then total_packages=1 fi - msg_ok "$(translate "Packages upgrade successfull")" + msg_ok "$(translate "Packages upgrade successful")" tput civis tput sc @@ -748,8 +748,9 @@ install_log2ram_auto() { return 1 fi - # Detect RAM - RAM_SIZE_GB=$(free -g | awk '/^Mem:/{print $2}') + # Detect RAM (in MB first for better accuracy) + RAM_SIZE_MB=$(free -m | awk '/^Mem:/{print $2}') + RAM_SIZE_GB=$((RAM_SIZE_MB / 1024)) [[ -z "$RAM_SIZE_GB" || "$RAM_SIZE_GB" -eq 0 ]] && RAM_SIZE_GB=4 if (( RAM_SIZE_GB <= 8 )); then @@ -773,7 +774,13 @@ install_log2ram_auto() { cat << 'EOF' > /usr/local/bin/log2ram-check.sh #!/bin/bash CONF_FILE="/etc/log2ram.conf" -LIMIT_KB=$(grep '^SIZE=' "$CONF_FILE" | cut -d'=' -f2 | tr -d 'M')000 +SIZE_VALUE=$(grep '^SIZE=' "$CONF_FILE" | cut -d'=' -f2) +# Convert to KB: handle M (megabytes) and G (gigabytes) +if [[ "$SIZE_VALUE" == *"G" ]]; then + LIMIT_KB=$(($(echo "$SIZE_VALUE" | tr -d 'G') * 1024 * 1024)) +else + LIMIT_KB=$(($(echo "$SIZE_VALUE" | tr -d 'M') * 1024)) +fi USED_KB=$(df /var/log --output=used | tail -1) THRESHOLD=$(( LIMIT_KB * 90 / 100 )) if (( USED_KB > THRESHOLD )); then From 27231d1764b10ba2504dcd05c6eb4e5b13adad94 Mon Sep 17 00:00:00 2001 From: cod378 Date: Sun, 2 Nov 2025 03:25:41 +0000 Subject: [PATCH 009/114] feat: switch iGPU configuration to use local scripts --- scripts/configure_igpu_lxc.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/configure_igpu_lxc.sh b/scripts/configure_igpu_lxc.sh index 6bcd9a3..aa571fc 100644 --- a/scripts/configure_igpu_lxc.sh +++ b/scripts/configure_igpu_lxc.sh @@ -16,7 +16,7 @@ # ========================================================== # Configuration ============================================ -REPO_URL="https://raw.githubusercontent.com/MacRimi/ProxMenux/main" +LOCAL_SCRIPTS="/usr/local/share/proxmenux/scripts" BASE_DIR="/usr/local/share/proxmenux" UTILS_FILE="$BASE_DIR/utils.sh" VENV_PATH="/opt/googletrans-env" From 49ea2b304d025d417dba04126622f1a723d8133e Mon Sep 17 00:00:00 2001 From: cod378 Date: Sun, 2 Nov 2025 03:26:27 +0000 Subject: [PATCH 010/114] feat: switch disk passthrough script to use local scripts --- scripts/disk-passthrough_ct.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/disk-passthrough_ct.sh b/scripts/disk-passthrough_ct.sh index 5de0134..c5cbb84 100644 --- a/scripts/disk-passthrough_ct.sh +++ b/scripts/disk-passthrough_ct.sh @@ -21,7 +21,7 @@ # Configuration ============================================ -REPO_URL="https://raw.githubusercontent.com/MacRimi/ProxMenux/main" +LOCAL_SCRIPTS="/usr/local/share/proxmenux/scripts" BASE_DIR="/usr/local/share/proxmenux" UTILS_FILE="$BASE_DIR/utils.sh" VENV_PATH="/opt/googletrans-env" From 61cd198d3504382056ce1d2ecfdb450c3ab7ff0d Mon Sep 17 00:00:00 2001 From: cod378 Date: Sun, 2 Nov 2025 03:27:18 +0000 Subject: [PATCH 011/114] feat: switch disk passthrough script to use local scripts --- scripts/disk-passthrough.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/disk-passthrough.sh b/scripts/disk-passthrough.sh index e90c421..d33ed25 100644 --- a/scripts/disk-passthrough.sh +++ b/scripts/disk-passthrough.sh @@ -28,7 +28,7 @@ # Configuration ============================================ -REPO_URL="https://raw.githubusercontent.com/MacRimi/ProxMenux/main" +LOCAL_SCRIPTS="/usr/local/share/proxmenux/scripts" BASE_DIR="/usr/local/share/proxmenux" UTILS_FILE="$BASE_DIR/utils.sh" VENV_PATH="/opt/googletrans-env" From a5459acdaf786767e077bc669f95f9d95eef21cf Mon Sep 17 00:00:00 2001 From: cod378 Date: Sun, 2 Nov 2025 03:28:14 +0000 Subject: [PATCH 012/114] feat: switch help menu from remote to local script loading --- scripts/help_info_menu.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/help_info_menu.sh b/scripts/help_info_menu.sh index ef6ae26..285f7c5 100644 --- a/scripts/help_info_menu.sh +++ b/scripts/help_info_menu.sh @@ -19,7 +19,7 @@ # ========================================================== # Configuration ============================================ -REPO_URL="https://raw.githubusercontent.com/MacRimi/ProxMenux/main" +LOCAL_SCRIPTS="/usr/local/share/proxmenux/scripts" BASE_DIR="/usr/local/share/proxmenux" UTILS_FILE="$BASE_DIR/utils.sh" VENV_PATH="/opt/googletrans-env" From 6ed14e1d3ca57e9b0976525c2d6ca247fa226009 Mon Sep 17 00:00:00 2001 From: cod378 Date: Sun, 2 Nov 2025 03:29:56 +0000 Subject: [PATCH 013/114] feat: switch from remote to local script loading --- scripts/import-disk-image.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/import-disk-image.sh b/scripts/import-disk-image.sh index d36f71e..011c4da 100644 --- a/scripts/import-disk-image.sh +++ b/scripts/import-disk-image.sh @@ -27,7 +27,7 @@ # ========================================================== # Configuration ============================================ -REPO_URL="https://raw.githubusercontent.com/MacRimi/ProxMenux/main" +LOCAL_SCRIPTS="/usr/local/share/proxmenux/scripts" BASE_DIR="/usr/local/share/proxmenux" UTILS_FILE="$BASE_DIR/utils.sh" VENV_PATH="/opt/googletrans-env" From 8fe7d249f8161be56493990c36e7067aa20c0649 Mon Sep 17 00:00:00 2001 From: cod378 Date: Sun, 2 Nov 2025 03:32:02 +0000 Subject: [PATCH 014/114] refactor: update script paths to use local resources --- scripts/install_coral_lxc.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/install_coral_lxc.sh b/scripts/install_coral_lxc.sh index 6532955..6212aca 100644 --- a/scripts/install_coral_lxc.sh +++ b/scripts/install_coral_lxc.sh @@ -22,7 +22,7 @@ # Includes USB passthrough enhancement using persistent udev alias (/dev/coral). # ========================================================== -REPO_URL="https://raw.githubusercontent.com/MacRimi/ProxMenux/main" +LOCAL_SCRIPTS="/usr/local/share/proxmenux/scripts" BASE_DIR="/usr/local/share/proxmenux" UTILS_FILE="$BASE_DIR/utils.sh" VENV_PATH="/opt/googletrans-env" From 8edf488636013620e9881053c9b7ee70e75c0987 Mon Sep 17 00:00:00 2001 From: cod378 Date: Sun, 2 Nov 2025 03:32:41 +0000 Subject: [PATCH 015/114] refactor: update script paths to use local references --- scripts/install_coral_pve.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/install_coral_pve.sh b/scripts/install_coral_pve.sh index 27178ca..9cc13b1 100644 --- a/scripts/install_coral_pve.sh +++ b/scripts/install_coral_pve.sh @@ -17,7 +17,7 @@ # Configuration ============================================ -REPO_URL="https://raw.githubusercontent.com/MacRimi/ProxMenux/main" +LOCAL_SCRIPTS="/usr/local/share/proxmenux/scripts" BASE_DIR="/usr/local/share/proxmenux" UTILS_FILE="$BASE_DIR/utils.sh" VENV_PATH="/opt/googletrans-env" From 4bed489610f929c151665c863ad1ef9002ede967 Mon Sep 17 00:00:00 2001 From: cod378 Date: Sun, 2 Nov 2025 23:08:34 +0000 Subject: [PATCH 016/114] refactor: switch backup scripts from remote URL to local paths --- scripts/backup_restore/backup_host.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/backup_restore/backup_host.sh b/scripts/backup_restore/backup_host.sh index dda4612..97876e6 100644 --- a/scripts/backup_restore/backup_host.sh +++ b/scripts/backup_restore/backup_host.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash # Configuration ============================================ -REPO_URL="https://raw.githubusercontent.com/MacRimi/ProxMenux/main" +LOCAL_SCRIPTS="/usr/local/share/proxmenux/scripts" BASE_DIR="/usr/local/share/proxmenux" UTILS_FILE="$BASE_DIR/utils.sh" VENV_PATH="/opt/googletrans-env" @@ -16,7 +16,7 @@ initialize_cache get_external_backup_mount_point() { local BACKUP_MOUNT_FILE="/usr/local/share/proxmenux/last_backup_mount.txt" - local STORAGE_REPO="$REPO_URL/scripts/backup_restore" + local STORAGE_REPO="$LOCAL_SCRIPTS/backup_restore" local MOUNT_POINT if [[ -f "$BACKUP_MOUNT_FILE" ]]; then @@ -36,7 +36,7 @@ get_external_backup_mount_point() { echo "$MOUNT_POINT" return 0 else - source <(curl -s "$STORAGE_REPO/mount_disk_host_bk.sh") + source "$STORAGE_REPO/mount_disk_host_bk.sh" MOUNT_POINT=$(mount_disk_host_bk) [[ -z "$MOUNT_POINT" ]] && msg_error "$(translate "No disk mounted.")" && return 1 echo "$MOUNT_POINT" From 6d44c229826a9dfff9643af46c4f8b0f63507da6 Mon Sep 17 00:00:00 2001 From: cod378 Date: Sun, 2 Nov 2025 23:25:04 +0000 Subject: [PATCH 017/114] refactor: switch from remote to local script loading. --- scripts/backup_restore/backup_host2.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/backup_restore/backup_host2.sh b/scripts/backup_restore/backup_host2.sh index 144ba3a..abe86ec 100644 --- a/scripts/backup_restore/backup_host2.sh +++ b/scripts/backup_restore/backup_host2.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash # Configuration ============================================ -REPO_URL="https://raw.githubusercontent.com/MacRimi/ProxMenux/main" +LOCAL_SCRIPTS="/usr/local/share/proxmenux/scripts" BASE_DIR="/usr/local/share/proxmenux" UTILS_FILE="$BASE_DIR/utils.sh" VENV_PATH="/opt/googletrans-env" @@ -16,7 +16,7 @@ initialize_cache get_external_backup_mount_point() { local BACKUP_MOUNT_FILE="/usr/local/share/proxmenux/last_backup_mount.txt" - local STORAGE_REPO="$REPO_URL/scripts/backup_restore" + local STORAGE_REPO="$LOCAL_SCRIPTS/backup_restore" local MOUNT_POINT if [[ -f "$BACKUP_MOUNT_FILE" ]]; then @@ -36,7 +36,7 @@ get_external_backup_mount_point() { echo "$MOUNT_POINT" return 0 else - source <(curl -s "$STORAGE_REPO/mount_disk_host_bk.sh") + source "$STORAGE_REPO/mount_disk_host_bk.sh" MOUNT_POINT=$(mount_disk_host_bk) [[ -z "$MOUNT_POINT" ]] && msg_error "$(translate "No disk mounted.")" && return 1 echo "$MOUNT_POINT" @@ -1058,4 +1058,4 @@ read -r # =============================== -host_backup_menu \ No newline at end of file +host_backup_menu From f2509dbe5d1e0d2e3ccc43ed447b05bd0f1a812f Mon Sep 17 00:00:00 2001 From: cod378 Date: Sun, 2 Nov 2025 23:26:45 +0000 Subject: [PATCH 018/114] refactor: switch from remote to local script loading. --- scripts/backup_restore/backup_host3.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/backup_restore/backup_host3.sh b/scripts/backup_restore/backup_host3.sh index 99880ac..9ea0d07 100644 --- a/scripts/backup_restore/backup_host3.sh +++ b/scripts/backup_restore/backup_host3.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash # Configuration ============================================ -REPO_URL="https://raw.githubusercontent.com/MacRimi/ProxMenux/main" +LOCAL_SCRIPTS="/usr/local/share/proxmenux/scripts" BASE_DIR="/usr/local/share/proxmenux" UTILS_FILE="$BASE_DIR/utils.sh" VENV_PATH="/opt/googletrans-env" @@ -16,7 +16,7 @@ initialize_cache get_external_backup_mount_point() { local BACKUP_MOUNT_FILE="/usr/local/share/proxmenux/last_backup_mount.txt" - local STORAGE_REPO="$REPO_URL/scripts/backup_restore" + local STORAGE_REPO="$LOCAL_SCRIPTS/backup_restore" local MOUNT_POINT if [[ -f "$BACKUP_MOUNT_FILE" ]]; then @@ -36,7 +36,7 @@ get_external_backup_mount_point() { echo "$MOUNT_POINT" return 0 else - source <(curl -s "$STORAGE_REPO/mount_disk_host_bk.sh") + source "$STORAGE_REPO/mount_disk_host_bk.sh" MOUNT_POINT=$(mount_disk_host_bk) [[ -z "$MOUNT_POINT" ]] && msg_error "$(translate "No disk mounted.")" && return 1 echo "$MOUNT_POINT" @@ -1291,4 +1291,4 @@ read -r # =============================== -host_backup_menu \ No newline at end of file +host_backup_menu From c751a8168acf495dae381cc9f960a9c9a521c3c6 Mon Sep 17 00:00:00 2001 From: cod378 Date: Sun, 2 Nov 2025 23:36:13 +0000 Subject: [PATCH 019/114] refactor: switch backup script from remote URL to local file paths --- scripts/backup_restore/backup_host4.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/backup_restore/backup_host4.sh b/scripts/backup_restore/backup_host4.sh index dda873e..d77ca60 100644 --- a/scripts/backup_restore/backup_host4.sh +++ b/scripts/backup_restore/backup_host4.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash # Configuration ============================================ -REPO_URL="https://raw.githubusercontent.com/MacRimi/ProxMenux/main" +LOCAL_SCRIPTS="/usr/local/share/proxmenux/scripts" BASE_DIR="/usr/local/share/proxmenux" UTILS_FILE="$BASE_DIR/utils.sh" VENV_PATH="/opt/googletrans-env" @@ -16,7 +16,7 @@ initialize_cache get_external_backup_mount_point() { local BACKUP_MOUNT_FILE="/usr/local/share/proxmenux/last_backup_mount.txt" - local STORAGE_REPO="$REPO_URL/scripts/backup_restore" + local STORAGE_REPO="$LOCAL_SCRIPTS/backup_restore" local MOUNT_POINT if [[ -f "$BACKUP_MOUNT_FILE" ]]; then @@ -36,7 +36,7 @@ get_external_backup_mount_point() { echo "$MOUNT_POINT" return 0 else - source <(curl -s "$STORAGE_REPO/mount_disk_host_bk.sh") + source "$STORAGE_REPO/mount_disk_host_bk.sh" MOUNT_POINT=$(mount_disk_host_bk) [[ -z "$MOUNT_POINT" ]] && msg_error "$(translate "No disk mounted.")" && return 1 echo "$MOUNT_POINT" From 17b8d63e6c68f1c35efbc8627b436b8d6468b60c Mon Sep 17 00:00:00 2001 From: cod378 Date: Sun, 2 Nov 2025 23:55:37 +0000 Subject: [PATCH 020/114] refactor: switch from remote URLs to local script paths --- scripts/backup_restore/mount_disk_host_bk.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/backup_restore/mount_disk_host_bk.sh b/scripts/backup_restore/mount_disk_host_bk.sh index ca33010..e8b1318 100644 --- a/scripts/backup_restore/mount_disk_host_bk.sh +++ b/scripts/backup_restore/mount_disk_host_bk.sh @@ -10,7 +10,7 @@ # Last Updated: 13/12/2024 # ========================================================== -REPO_URL="https://raw.githubusercontent.com/MacRimi/ProxMenux/main" +LOCAL_SCRIPTS="/usr/local/share/proxmenux/scripts" BASE_DIR="/usr/local/share/proxmenux" UTILS_FILE="$BASE_DIR/utils.sh" VENV_PATH="/opt/googletrans-env" From bbc3c922a641c859d4b533a24d36ec502e9aa65a Mon Sep 17 00:00:00 2001 From: cod378 Date: Sun, 2 Nov 2025 23:58:48 +0000 Subject: [PATCH 021/114] refactor: switch from remote repo to local script paths --- scripts/global/common-functions.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/global/common-functions.sh b/scripts/global/common-functions.sh index cda8b9b..b56baf4 100644 --- a/scripts/global/common-functions.sh +++ b/scripts/global/common-functions.sh @@ -4,7 +4,7 @@ # ========================================================== # Configuration -REPO_URL="https://raw.githubusercontent.com/MacRimi/ProxMenux/main" +LOCAL_SCRIPTS="/usr/local/share/proxmenux/scripts" BASE_DIR="/usr/local/share/proxmenux" UTILS_FILE="$BASE_DIR/utils.sh" VENV_PATH="/opt/googletrans-env" From 9341b49fd19960d6dbd1b6aba48a699fb7aad27e Mon Sep 17 00:00:00 2001 From: cod378 Date: Mon, 3 Nov 2025 00:00:52 +0000 Subject: [PATCH 022/114] refactor: update script paths to use local references --- scripts/global/remove-banner-pve8.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/global/remove-banner-pve8.sh b/scripts/global/remove-banner-pve8.sh index 47925b4..9eb7118 100644 --- a/scripts/global/remove-banner-pve8.sh +++ b/scripts/global/remove-banner-pve8.sh @@ -2,7 +2,7 @@ # ========================================================== # Remove Subscription Banner - Proxmox VE 8.4.9 # ========================================================== -REPO_URL="https://raw.githubusercontent.com/MacRimi/ProxMenux/main" +LOCAL_SCRIPTS="/usr/local/share/proxmenux/scripts" BASE_DIR="/usr/local/share/proxmenux" UTILS_FILE="$BASE_DIR/utils.sh" VENV_PATH="/opt/googletrans-env" From d0a57d4b7c214d7d39b01453bb1ca297bceb739d Mon Sep 17 00:00:00 2001 From: cod378 Date: Mon, 3 Nov 2025 00:01:36 +0000 Subject: [PATCH 023/114] refactor: update script paths to use local resources --- scripts/global/remove-banner-pve9_.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/global/remove-banner-pve9_.sh b/scripts/global/remove-banner-pve9_.sh index ed1c364..8183edb 100644 --- a/scripts/global/remove-banner-pve9_.sh +++ b/scripts/global/remove-banner-pve9_.sh @@ -2,7 +2,7 @@ # ========================================================== # Remove Subscription Banner - Proxmox VE 9.x ONLY # ========================================================== -REPO_URL="https://raw.githubusercontent.com/MacRimi/ProxMenux/main" +LOCAL_SCRIPTS="/usr/local/share/proxmenux/scripts" BASE_DIR="/usr/local/share/proxmenux" UTILS_FILE="$BASE_DIR/utils.sh" VENV_PATH="/opt/googletrans-env" From 25966973a2383ac12bdbcba97494442d331c81e7 Mon Sep 17 00:00:00 2001 From: cod378 Date: Mon, 3 Nov 2025 00:03:21 +0000 Subject: [PATCH 024/114] refactor: update script paths to use local resources --- scripts/global/remove-banner-pve9.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/global/remove-banner-pve9.sh b/scripts/global/remove-banner-pve9.sh index e46a985..97948f6 100644 --- a/scripts/global/remove-banner-pve9.sh +++ b/scripts/global/remove-banner-pve9.sh @@ -2,7 +2,7 @@ # ========================================================== # Remove Subscription Banner - Proxmox VE 9.x # ========================================================== -REPO_URL="https://raw.githubusercontent.com/MacRimi/ProxMenux/main" +LOCAL_SCRIPTS="/usr/local/share/proxmenux/scripts" BASE_DIR="/usr/local/share/proxmenux" UTILS_FILE="$BASE_DIR/utils.sh" VENV_PATH="/opt/googletrans-env" From c696cfd8d89a726a94a244002bf2b25642553c91 Mon Sep 17 00:00:00 2001 From: cod378 Date: Mon, 3 Nov 2025 00:04:47 +0000 Subject: [PATCH 025/114] refactor: switch update script to use local file paths --- scripts/global/update-pve.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/global/update-pve.sh b/scripts/global/update-pve.sh index 5f6f9a7..8cfc0a6 100644 --- a/scripts/global/update-pve.sh +++ b/scripts/global/update-pve.sh @@ -4,7 +4,7 @@ # ========================================================== # Configuration -REPO_URL="https://raw.githubusercontent.com/MacRimi/ProxMenux/main" +LOCAL_SCRIPTS="/usr/local/share/proxmenux/scripts" BASE_DIR="/usr/local/share/proxmenux" UTILS_FILE="$BASE_DIR/utils.sh" VENV_PATH="/opt/googletrans-env" @@ -29,7 +29,7 @@ register_tool() { } download_common_functions() { - if ! source <(curl -s "$REPO_URL/scripts/global/common-functions.sh"); then + if ! source "$LOCAL_SCRIPTS/global/common-functions.sh"; then return 1 fi } From 887b170c0e98bf91f799cbf1e638011dd6481419 Mon Sep 17 00:00:00 2001 From: cod378 Date: Mon, 3 Nov 2025 00:06:12 +0000 Subject: [PATCH 026/114] refactor: switch script to use local paths instead of remote URLs --- scripts/global/update-pve8.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/global/update-pve8.sh b/scripts/global/update-pve8.sh index 048bb45..d745f2b 100644 --- a/scripts/global/update-pve8.sh +++ b/scripts/global/update-pve8.sh @@ -4,7 +4,7 @@ # ========================================================== # Configuration -REPO_URL="https://raw.githubusercontent.com/MacRimi/ProxMenux/main" +LOCAL_SCRIPTS="/usr/local/share/proxmenux/scripts" BASE_DIR="/usr/local/share/proxmenux" UTILS_FILE="$BASE_DIR/utils.sh" VENV_PATH="/opt/googletrans-env" @@ -29,7 +29,7 @@ register_tool() { } download_common_functions() { - if ! source <(curl -s "$REPO_URL/scripts/global/common-functions.sh"); then + if ! source "$LOCAL_SCRIPTS/global/common-functions.sh"; then return 1 fi } From f99b7f358989e3a62158425c26947889b4aa1361 Mon Sep 17 00:00:00 2001 From: cod378 Date: Mon, 3 Nov 2025 00:07:34 +0000 Subject: [PATCH 027/114] refactor: switch script to use local paths instead of remote URLs --- scripts/global/update-pve9_2.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/global/update-pve9_2.sh b/scripts/global/update-pve9_2.sh index 7e1b7c7..7642905 100644 --- a/scripts/global/update-pve9_2.sh +++ b/scripts/global/update-pve9_2.sh @@ -4,7 +4,7 @@ # ========================================================== # Configuration -REPO_URL="https://raw.githubusercontent.com/MacRimi/ProxMenux/main" +LOCAL_SCRIPTS="/usr/local/share/proxmenux/scripts" BASE_DIR="/usr/local/share/proxmenux" UTILS_FILE="$BASE_DIR/utils.sh" VENV_PATH="/opt/googletrans-env" @@ -29,7 +29,7 @@ register_tool() { } download_common_functions() { - if ! source <(curl -s "$REPO_URL/scripts/global/common-functions.sh"); then + if ! source "$LOCAL_SCRIPTS/global/common-functions.sh"; then return 1 fi } From c4ec390ca0e454e5641dbf58ff0a7cbf782d15ca Mon Sep 17 00:00:00 2001 From: cod378 Date: Mon, 3 Nov 2025 00:13:19 +0000 Subject: [PATCH 028/114] refactor: update scripts paths to use local references --- scripts/gpu_tpu/install_coral_pve9.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/gpu_tpu/install_coral_pve9.sh b/scripts/gpu_tpu/install_coral_pve9.sh index 1eaf290..1eab069 100644 --- a/scripts/gpu_tpu/install_coral_pve9.sh +++ b/scripts/gpu_tpu/install_coral_pve9.sh @@ -7,7 +7,7 @@ # Last Updated: 25/09/2025 # ========================================= -REPO_URL="https://raw.githubusercontent.com/MacRimi/ProxMenux/main" +LOCAL_SCRIPTS="/usr/local/share/proxmenux/scripts" BASE_DIR="/usr/local/share/proxmenux" UTILS_FILE="$BASE_DIR/utils.sh" LOG_FILE="/tmp/coral_install.log" From 3079a3f51cfa50143e33c21a0c9b84104a74e4a7 Mon Sep 17 00:00:00 2001 From: cod378 Date: Mon, 3 Nov 2025 00:15:08 +0000 Subject: [PATCH 029/114] refactor: update script paths to use local resources --- scripts/lxc/lxc-manual-guide.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/lxc/lxc-manual-guide.sh b/scripts/lxc/lxc-manual-guide.sh index 192049c..ed0b168 100644 --- a/scripts/lxc/lxc-manual-guide.sh +++ b/scripts/lxc/lxc-manual-guide.sh @@ -11,7 +11,7 @@ # ========================================================== # Configuration ============================================ -REPO_URL="https://raw.githubusercontent.com/MacRimi/ProxMenux/main" +LOCAL_SCRIPTS="/usr/local/share/proxmenux/scripts" BASE_DIR="/usr/local/share/proxmenux" UTILS_FILE="$BASE_DIR/utils.sh" VENV_PATH="/opt/googletrans-env" From 55011842f50850e8899cabe9fbb69699014ab86b Mon Sep 17 00:00:00 2001 From: cod378 Date: Mon, 3 Nov 2025 00:15:42 +0000 Subject: [PATCH 030/114] refactor: update script paths to use local resources --- scripts/lxc/lxc-privileged-to-unprivileged.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/lxc/lxc-privileged-to-unprivileged.sh b/scripts/lxc/lxc-privileged-to-unprivileged.sh index 9d97887..ff27891 100644 --- a/scripts/lxc/lxc-privileged-to-unprivileged.sh +++ b/scripts/lxc/lxc-privileged-to-unprivileged.sh @@ -15,7 +15,7 @@ # ========================================================== # Configuration ============================================ -REPO_URL="https://raw.githubusercontent.com/MacRimi/ProxMenux/main" +LOCAL_SCRIPTS="/usr/local/share/proxmenux/scripts" BASE_DIR="/usr/local/share/proxmenux" UTILS_FILE="$BASE_DIR/utils.sh" VENV_PATH="/opt/googletrans-env" From cfd89a14f77b93682ba96a59b70f7e9f3e770192 Mon Sep 17 00:00:00 2001 From: cod378 Date: Mon, 3 Nov 2025 00:16:28 +0000 Subject: [PATCH 031/114] refactor: update script paths to use local resources --- scripts/lxc/lxc-unprivileged-to-privileged.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/lxc/lxc-unprivileged-to-privileged.sh b/scripts/lxc/lxc-unprivileged-to-privileged.sh index e8e1076..e103bda 100644 --- a/scripts/lxc/lxc-unprivileged-to-privileged.sh +++ b/scripts/lxc/lxc-unprivileged-to-privileged.sh @@ -16,7 +16,7 @@ # ========================================================== # Configuration ============================================ -REPO_URL="https://raw.githubusercontent.com/MacRimi/ProxMenux/main" +LOCAL_SCRIPTS="/usr/local/share/proxmenux/scripts" BASE_DIR="/usr/local/share/proxmenux" UTILS_FILE="$BASE_DIR/utils.sh" VENV_PATH="/opt/googletrans-env" From 8f62ed67d3a461dc4bd653b61afaa0f963961b73 Mon Sep 17 00:00:00 2001 From: cod378 Date: Mon, 3 Nov 2025 00:22:59 +0000 Subject: [PATCH 032/114] refactor: switch from remote URL to local script paths --- scripts/menus/config_menu.sh | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/scripts/menus/config_menu.sh b/scripts/menus/config_menu.sh index 41c8ebf..eaab541 100644 --- a/scripts/menus/config_menu.sh +++ b/scripts/menus/config_menu.sh @@ -10,7 +10,7 @@ # ========================================================== # Configuration ============================================ -REPO_URL="https://raw.githubusercontent.com/MacRimi/ProxMenux/main" +LOCAL_SCRIPTS="/usr/local/share/proxmenux/scripts" BASE_DIR="/usr/local/share/proxmenux" CONFIG_FILE="$BASE_DIR/config.json" CACHE_FILE="$BASE_DIR/cache.json" @@ -218,7 +218,7 @@ show_config_menu() { uninstall_proxmenu ;; "return_main"|"") - exec bash <(curl -s "$REPO_URL/scripts/menus/main_menu.sh") + exec bash "$LOCAL_SCRIPTS/menus/main_menu.sh" ;; esac done @@ -257,11 +257,7 @@ change_language() { --msgbox "\n\n$(translate "Language changed to") $new_language" 10 50 # Reload menu with new language - TMP_FILE=$(mktemp) - curl -s "$REPO_URL/scripts/menus/config_menu.sh" > "$TMP_FILE" - chmod +x "$TMP_FILE" - trap 'rm -f "$TMP_FILE"' EXIT - exec bash "$TMP_FILE" + exec bash "$LOCAL_SCRIPTS/menus/config_menu.sh" } # ========================================================== From a9dd7562ac6098c045be2fcdb31385fc33023bae Mon Sep 17 00:00:00 2001 From: cod378 Date: Mon, 3 Nov 2025 00:46:23 +0000 Subject: [PATCH 033/114] feat: switch from remote URLs to local script paths - Changed script sourcing from GitHub URLs to local filesystem paths for improved reliability - Added error handling for missing script files with descriptive messages - Removed redundant utility file sourcing and consolidated into single conditional block - Updated script execution to use direct paths instead of curl commands - Removed unused start_vm_configuration function that was duplicated elsewhere --- scripts/menus/create_vm_menu.sh | 59 ++++++++++----------------------- 1 file changed, 18 insertions(+), 41 deletions(-) diff --git a/scripts/menus/create_vm_menu.sh b/scripts/menus/create_vm_menu.sh index ecca36a..c065513 100644 --- a/scripts/menus/create_vm_menu.sh +++ b/scripts/menus/create_vm_menu.sh @@ -26,30 +26,30 @@ -REPO_URL="https://raw.githubusercontent.com/MacRimi/ProxMenux/main" -VM_REPO="$REPO_URL/scripts/vm" -ISO_REPO="$REPO_URL/scripts/vm" -MENU_REPO="$REPO_URL/scripts/menus" +LOCAL_SCRIPTS="/usr/local/share/proxmenux/scripts" +VM_REPO="$LOCAL_SCRIPTS/vm" +ISO_REPO="$LOCAL_SCRIPTS/vm" +MENU_REPO="$LOCAL_SCRIPTS/menus" BASE_DIR="/usr/local/share/proxmenux" UTILS_FILE="$BASE_DIR/utils.sh" VENV_PATH="/opt/googletrans-env" -[[ -f "$UTILS_FILE" ]] && source "$UTILS_FILE" - - -source <(curl -s "$VM_REPO/vm_configurator.sh") -source <(curl -s "$VM_REPO/disk_selector.sh") -source <(curl -s "$VM_REPO/vm_creator.sh") - - - +# Source utilities and required scripts if [[ -f "$UTILS_FILE" ]]; then source "$UTILS_FILE" +else + echo "Error: $UTILS_FILE not found" + exit 1 fi load_language initialize_cache +# Source VM management scripts +[[ -f "$VM_REPO/vm_configurator.sh" ]] && source "$VM_REPO/vm_configurator.sh" || { echo "Error: vm_configurator.sh not found"; exit 1; } +[[ -f "$VM_REPO/disk_selector.sh" ]] && source "$VM_REPO/disk_selector.sh" || { echo "Error: disk_selector.sh not found"; exit 1; } +[[ -f "$VM_REPO/vm_creator.sh" ]] && source "$VM_REPO/vm_creator.sh" || { echo "Error: vm_creator.sh not found"; exit 1; } + function header_info() { @@ -108,17 +108,17 @@ while true; do 3>&1 1>&2 2>&3) - [[ $? -ne 0 || "$OS_TYPE" == "6" ]] && exec bash <(curl -s "$MENU_REPO/main_menu.sh") + [[ $? -ne 0 || "$OS_TYPE" == "6" ]] && exec bash "$MENU_REPO/main_menu.sh" case "$OS_TYPE" in 1) - source <(curl -fsSL "$ISO_REPO/select_nas_iso.sh") && select_nas_iso || continue + source "$ISO_REPO/select_nas_iso.sh" && select_nas_iso || continue ;; 2) - source <(curl -fsSL "$ISO_REPO/select_windows_iso.sh") && select_windows_iso || continue + source "$ISO_REPO/select_windows_iso.sh" && select_windows_iso || continue ;; 3) - source <(curl -fsSL "$ISO_REPO/select_linux_iso.sh") && select_linux_iso || continue + source "$ISO_REPO/select_linux_iso.sh" && select_linux_iso || continue ;; 4) whiptail --title "OSX-PROXMOX" --yesno "$(translate "This is an external script that creates a macOS VM in Proxmox VE in just a few steps, whether you are using AMD or Intel hardware.")\n\n$(translate "The script clones the osx-proxmox.com repository and once the setup is complete, the server will automatically reboot.")\n\n$(translate "Make sure there are no critical services running as they will be interrupted. Ensure your server can be safely rebooted.")\n\n$(translate "Visit https://osx-proxmox.com for more information.")\n\n$(translate "Do you want to run the script now?")" 24 70 @@ -128,7 +128,7 @@ while true; do continue ;; 5) - source <(curl -fsSL "$ISO_REPO/select_linux_iso.sh") && select_linux_other_scripts || continue + source "$ISO_REPO/select_linux_iso.sh" && select_linux_other_scripts || continue ;; esac @@ -149,26 +149,3 @@ while true; do create_vm break done - - - - -function start_vm_configuration() { - - if (whiptail --title "ProxMenux" --yesno "$(translate "Use Default Settings?")" --no-button "$(translate "Advanced")" 10 60); then - header_info - load_default_vm_config "$OS_TYPE" - - if [[ -z "$HN" ]]; then - HN=$(whiptail --inputbox "$(translate "Enter a name for the new virtual machine:")" 10 60 --title "VM Hostname" 3>&1 1>&2 2>&3) - [[ -z "$HN" ]] && HN="custom-vm" - fi - - apply_default_vm_config - else - header_info - echo -e "${CUS}$(translate "Using advanced configuration")${CL}" - configure_vm_advanced "$OS_TYPE" - fi -} - From e421b400936b4ed2408324197a0275d201ac927b Mon Sep 17 00:00:00 2001 From: cod378 Date: Mon, 3 Nov 2025 00:50:18 +0000 Subject: [PATCH 034/114] refactor: switch from remote scripts to local execution --- scripts/menus/hw_grafics_menu.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/scripts/menus/hw_grafics_menu.sh b/scripts/menus/hw_grafics_menu.sh index 33ebb64..5eacb40 100644 --- a/scripts/menus/hw_grafics_menu.sh +++ b/scripts/menus/hw_grafics_menu.sh @@ -12,7 +12,7 @@ # Configuration ============================================ -REPO_URL="https://raw.githubusercontent.com/MacRimi/ProxMenux/main" +LOCAL_SCRIPTS="/usr/local/share/proxmenux/scripts" BASE_DIR="/usr/local/share/proxmenux" UTILS_FILE="$BASE_DIR/utils.sh" VENV_PATH="/opt/googletrans-env" @@ -35,24 +35,24 @@ initialize_cache case $OPTION in 1) - bash <(curl -s "$REPO_URL/scripts/configure_igpu_lxc.sh") + bash "$LOCAL_SCRIPTS/configure_igpu_lxc.sh" if [ $? -ne 0 ]; then return fi ;; 2) - bash <(curl -s "$REPO_URL/scripts/install_coral_lxc.sh") + bash "$LOCAL_SCRIPTS/install_coral_lxc.sh" if [ $? -ne 0 ]; then return fi ;; 3) - bash <(curl -s "$REPO_URL/scripts/gpu_tpu/install_coral_pve9.sh") + bash "$LOCAL_SCRIPTS/gpu_tpu/install_coral_pve9.sh" if [ $? -ne 0 ]; then return fi ;; - 4) exec bash <(curl -s "$REPO_URL/scripts/menus/main_menu.sh") ;; - *) exec bash <(curl -s "$REPO_URL/scripts/menus/main_menu.sh") ;; + 4) exec bash "$LOCAL_SCRIPTS/menus/main_menu.sh" ;; + *) exec bash "$LOCAL_SCRIPTS/menus/main_menu.sh" ;; esac done From 4ea20884854c6d2d441fba9e4b4b3388d8ecd0f9 Mon Sep 17 00:00:00 2001 From: cod378 Date: Mon, 3 Nov 2025 00:59:48 +0000 Subject: [PATCH 035/114] refactor: replace remote script loading with local file execution - Changed script loading from curl-based remote fetching to local file execution for improved security and reliability - Removed dependency on external repository access for core menu functionality - Fixed missing semicolon in case statement default branch --- scripts/menus/lxc_menu.sh | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/scripts/menus/lxc_menu.sh b/scripts/menus/lxc_menu.sh index b43a467..228feda 100644 --- a/scripts/menus/lxc_menu.sh +++ b/scripts/menus/lxc_menu.sh @@ -15,7 +15,7 @@ # ========================================================== # Configuration ============================================ -REPO_URL="https://raw.githubusercontent.com/MacRimi/ProxMenux/main" +LOCAL_SCRIPTS="/usr/local/share/proxmenux/scripts" BASE_DIR="/usr/local/share/proxmenux" UTILS_FILE="$BASE_DIR/utils.sh" VENV_PATH="/opt/googletrans-env" @@ -40,22 +40,23 @@ show_main_menu() { case $CHOICE in 1) - bash <(curl -s "$REPO_URL/scripts/lxc/lxc-privileged-to-unprivileged.sh") + bash "$LOCAL_SCRIPTS/lxc/lxc-privileged-to-unprivileged.sh" ;; 2) - bash <(curl -s "$REPO_URL/scripts/lxc/lxc-unprivileged-to-privileged.sh") + bash "$LOCAL_SCRIPTS/lxc/lxc-unprivileged-to-privileged.sh" ;; 3) show_container_status ;; 4) - bash <(curl -s "$REPO_URL/scripts/lxc/lxc-conversion-manual-guide.sh") + bash "$LOCAL_SCRIPTS/lxc/lxc-conversion-manual-guide.sh" ;; 5) - exec bash <(curl -s "$REPO_URL/scripts/menus/main_menu.sh") + exec bash "$LOCAL_SCRIPTS/menus/main_menu.sh" ;; *) - exec bash <(curl -s "$REPO_URL/scripts/menus/main_menu.sh") + exec bash "$LOCAL_SCRIPTS/menus/main_menu.sh" + ;; esac } @@ -99,6 +100,4 @@ show_container_status() { show_main_menu } - - - show_main_menu +show_main_menu From 7d00ff8869324befd7074a1633dd28dac443c28e Mon Sep 17 00:00:00 2001 From: cod378 Date: Mon, 3 Nov 2025 01:03:39 +0000 Subject: [PATCH 036/114] feat: switch menu scripts from remote URLs to local paths --- scripts/menus/main_menu.sh | 29 +++++++++++++---------------- scripts/menus/main_menu_.sh | 22 ++++++++++------------ 2 files changed, 23 insertions(+), 28 deletions(-) diff --git a/scripts/menus/main_menu.sh b/scripts/menus/main_menu.sh index 9705484..ff30d29 100644 --- a/scripts/menus/main_menu.sh +++ b/scripts/menus/main_menu.sh @@ -11,7 +11,7 @@ # ========================================================== # Configuration ============================================ -REPO_URL="https://raw.githubusercontent.com/MacRimi/ProxMenux/main" +LOCAL_SCRIPTS="/usr/local/share/proxmenux/scripts" BASE_DIR="/usr/local/share/proxmenux" UTILS_FILE="$BASE_DIR/utils.sh" VENV_PATH="/opt/googletrans-env" @@ -54,10 +54,10 @@ check_pve9_translation_compatibility() { --title "Translation Environment Incompatible with PVE $pve_version" \ --msgbox "NOTICE: You are running Proxmox VE $pve_version with translation components installed.\n\nTranslations are NOT supported in PVE 9+. This causes:\n• Menu loading errors\n• Translation failures\n• System instability\n\nREQUIRED ACTION:\nProxMenux will now automatically reinstall the Normal Version.\n\nThis process will:\n• Remove incompatible translation components\n• Install PVE 9+ compatible version\n• Preserve all your settings and preferences\n\nPress OK to continue with automatic reinstallation..." 20 75 - bash <(curl -sSL "$REPO_URL/install_proxmenux.sh") + bash "$BASE_DIR/install_proxmenux.sh" fi - exit + exit 0 fi } @@ -90,9 +90,6 @@ show_menu() { while true; do local menu_title="Main ProxMenux" - if [[ -n "$PROXMENUX_PVE9_WARNING_SHOWN" ]]; then - menu_title="Main ProxMenux" - fi dialog --clear \ --backtitle "ProxMenux" \ @@ -122,16 +119,16 @@ show_menu() { OPTION=$(<"$TEMP_FILE") case $OPTION in - 1) exec bash <(curl -s "$REPO_URL/scripts/menus/menu_post_install.sh") ;; - 2) exec bash <(curl -s "$REPO_URL/scripts/menus/hw_grafics_menu.sh") ;; - 3) exec bash <(curl -s "$REPO_URL/scripts/menus/create_vm_menu.sh") ;; - 4) exec bash <(curl -s "$REPO_URL/scripts/menus/storage_menu.sh") ;; - 5) exec bash <(curl -s "$REPO_URL/scripts/menus/share_menu.sh") ;; - 6) exec bash <(curl -s "$REPO_URL/scripts/menus/menu_Helper_Scripts.sh") ;; - 7) exec bash <(curl -s "$REPO_URL/scripts/menus/network_menu.sh") ;; - 8) exec bash <(curl -s "$REPO_URL/scripts/menus/utilities_menu.sh") ;; - h) bash <(curl -s "$REPO_URL/scripts/help_info_menu.sh") ;; - s) exec bash <(curl -s "$REPO_URL/scripts/menus/config_menu.sh") ;; + 1) exec bash "$LOCAL_SCRIPTS/menus/menu_post_install.sh" ;; + 2) exec bash "$LOCAL_SCRIPTS/menus/hw_grafics_menu.sh" ;; + 3) exec bash "$LOCAL_SCRIPTS/menus/create_vm_menu.sh" ;; + 4) exec bash "$LOCAL_SCRIPTS/menus/storage_menu.sh" ;; + 5) exec bash "$LOCAL_SCRIPTS/menus/share_menu.sh" ;; + 6) exec bash "$LOCAL_SCRIPTS/menus/menu_Helper_Scripts.sh" ;; + 7) exec bash "$LOCAL_SCRIPTS/menus/network_menu.sh" ;; + 8) exec bash "$LOCAL_SCRIPTS/menus/utilities_menu.sh" ;; + h) bash "$LOCAL_SCRIPTS/help_info_menu.sh" ;; + s) exec bash "$LOCAL_SCRIPTS/menus/config_menu.sh" ;; 0) clear; msg_ok "$(translate "Thank you for using ProxMenux. Goodbye!")"; rm -f "$TEMP_FILE"; exit 0 ;; *) msg_warn "$(translate "Invalid option")"; sleep 2 ;; esac diff --git a/scripts/menus/main_menu_.sh b/scripts/menus/main_menu_.sh index 215e301..463e805 100644 --- a/scripts/menus/main_menu_.sh +++ b/scripts/menus/main_menu_.sh @@ -11,7 +11,7 @@ # ========================================================== # Configuration ============================================ -REPO_URL="https://raw.githubusercontent.com/MacRimi/ProxMenux/main" +LOCAL_SCRIPTS="/usr/local/share/proxmenux/scripts" BASE_DIR="/usr/local/share/proxmenux" UTILS_FILE="$BASE_DIR/utils.sh" VENV_PATH="/opt/googletrans-env" @@ -62,21 +62,19 @@ show_menu() { OPTION=$(<"$TEMP_FILE") case $OPTION in - 1) exec bash <(curl -s "$REPO_URL/scripts/menus/menu_post_install.sh") ;; - 2) bash <(curl -s "$REPO_URL/scripts/help_info_menu.sh") ;; - 3) exec bash <(curl -s "$REPO_URL/scripts/menus/hw_grafics_menu.sh") ;; - 4) exec bash <(curl -s "$REPO_URL/scripts/menus/create_vm_menu.sh") ;; - 5) exec bash <(curl -s "$REPO_URL/scripts/menus/storage_menu.sh") ;; - 6) exec bash <(curl -s "$REPO_URL/scripts/menus/menu_Helper_Scripts.sh") ;; - 7) exec bash <(curl -s "$REPO_URL/scripts/menus/network_menu.sh") ;; - 8) exec bash <(curl -s "$REPO_URL/scripts/menus/utilities_menu.sh") ;; - 9) exec bash <(curl -s "$REPO_URL/scripts/menus/config_menu.sh") ;; + 1) exec bash "$LOCAL_SCRIPTS/menus/menu_post_install.sh" ;; + 2) bash "$LOCAL_SCRIPTS/help_info_menu.sh" ;; + 3) exec bash "$LOCAL_SCRIPTS/menus/hw_grafics_menu.sh" ;; + 4) exec bash "$LOCAL_SCRIPTS/menus/create_vm_menu.sh" ;; + 5) exec bash "$LOCAL_SCRIPTS/menus/storage_menu.sh" ;; + 6) exec bash "$LOCAL_SCRIPTS/menus/menu_Helper_Scripts.sh" ;; + 7) exec bash "$LOCAL_SCRIPTS/menus/network_menu.sh" ;; + 8) exec bash "$LOCAL_SCRIPTS/menus/utilities_menu.sh" ;; + 9) exec bash "$LOCAL_SCRIPTS/menus/config_menu.sh" ;; 0) clear; msg_ok "$(translate "Thank you for using ProxMenux. Goodbye!")"; rm -f "$TEMP_FILE"; exit 0 ;; *) msg_warn "$(translate "Invalid option")"; sleep 2 ;; esac done } - - show_menu From 22916868dfcce3fe6f123decfe465e5ab3c16ac3 Mon Sep 17 00:00:00 2001 From: cod378 Date: Mon, 3 Nov 2025 01:06:04 +0000 Subject: [PATCH 037/114] feat: switch script paths from remote repo to local directory --- scripts/menus/menu_Helper_Scripts.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/menus/menu_Helper_Scripts.sh b/scripts/menus/menu_Helper_Scripts.sh index 3f57e14..ea72758 100644 --- a/scripts/menus/menu_Helper_Scripts.sh +++ b/scripts/menus/menu_Helper_Scripts.sh @@ -20,7 +20,7 @@ # Configuration ============================================ -REPO_URL="https://raw.githubusercontent.com/MacRimi/ProxMenux/main" +LOCAL_SCRIPTS="/usr/local/share/proxmenux/scripts" BASE_DIR="/usr/local/share/proxmenux" UTILS_FILE="$BASE_DIR/utils.sh" VENV_PATH="/opt/googletrans-env" @@ -293,7 +293,7 @@ while true; do dialog --clear --title "Proxmox VE Helper-Scripts" \ --msgbox "\n\n$(translate "Visit the website to discover more scripts, stay updated with the latest updates, and support the project:")\n\nhttps://community-scripts.github.io/ProxmoxVE" 15 70 #clear - exec bash <(curl -s "$REPO_URL/scripts/menus/main_menu.sh") + exec bash <(curl -s "$LOCAL_SCRIPTS/menus/main_menu.sh") } if [[ "$SELECTED" == "search" ]]; then From 43fe7ae7dbf8f92d61ccdce379c981e1fdaeee9c Mon Sep 17 00:00:00 2001 From: cod378 Date: Mon, 3 Nov 2025 01:09:12 +0000 Subject: [PATCH 038/114] refactor: replace remote script fetching with local file execution --- scripts/menus/menu_post_install.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/scripts/menus/menu_post_install.sh b/scripts/menus/menu_post_install.sh index 3847208..5972528 100644 --- a/scripts/menus/menu_post_install.sh +++ b/scripts/menus/menu_post_install.sh @@ -9,7 +9,7 @@ # Last Updated: 06/07/2025 # ========================================================== -REPO_URL="https://raw.githubusercontent.com/MacRimi/ProxMenux/main" +LOCAL_SCRIPTS="/usr/local/share/proxmenux/scripts" BASE_DIR="/usr/local/share/proxmenux" UTILS_FILE="$BASE_DIR/utils.sh" VENV_PATH="/opt/googletrans-env" @@ -70,7 +70,7 @@ confirm_automated_script() { clear if [ $response -eq 0 ]; then - bash <(curl -s $REPO_URL/scripts/post_install/auto_post_install.sh) + bash "$LOCAL_SCRIPTS/post_install/auto_post_install.sh" else msg_warn "$(translate "Cancelled by user.")" sleep 1 @@ -80,9 +80,9 @@ confirm_automated_script() { # ========================================================== declare -a PROXMENUX_SCRIPTS=( - "Customizable post-installation script|ProxMenux|bash <(curl -s $REPO_URL/scripts/post_install/customizable_post_install.sh)" + "Customizable post-installation script|ProxMenux|bash \"$LOCAL_SCRIPTS/post_install/customizable_post_install.sh\"" "Automated post-installation script|ProxMenux|confirm_automated_script" - "Uninstall optimizations|ProxMenux|bash <(curl -s $REPO_URL/scripts/post_install/uninstall-tools.sh)" + "Uninstall optimizations|ProxMenux|bash \"$LOCAL_SCRIPTS/post_install/uninstall-tools.sh\"" ) @@ -168,7 +168,7 @@ show_menu() { if [ $exit_status -ne 0 ] || [ "$script_selection" = "0" ]; then - exec bash <(curl -s "$REPO_URL/scripts/menus/main_menu.sh") + exec bash "$LOCAL_SCRIPTS/menus/main_menu.sh" fi From c19c8f9c5d0494ed35e7a365ac6cc5ae5ce7a5c5 Mon Sep 17 00:00:00 2001 From: cod378 Date: Mon, 3 Nov 2025 01:10:44 +0000 Subject: [PATCH 039/114] refactor: switch network menu from remote URL to local scripts --- scripts/menus/network_menu.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/menus/network_menu.sh b/scripts/menus/network_menu.sh index 28edbe2..714eb7d 100644 --- a/scripts/menus/network_menu.sh +++ b/scripts/menus/network_menu.sh @@ -16,7 +16,7 @@ # Special thanks to @Andres_Eduardo_Rojas_Moya for contributing the persistent # network naming function and for the original idea. # Configuration ============================================ -REPO_URL="https://raw.githubusercontent.com/MacRimi/ProxMenux/main" +LOCAL_SCRIPTS="/usr/local/share/proxmenux/scripts" BASE_DIR="/usr/local/share/proxmenux" UTILS_FILE="$BASE_DIR/utils.sh" VENV_PATH="/opt/googletrans-env" @@ -1082,7 +1082,7 @@ show_menu() { if [ $exit_status -ne 0 ] || [ "$script_selection" = "0" ]; then - exec bash <(curl -s "$REPO_URL/scripts/menus/main_menu.sh") + exec bash "$LOCAL_SCRIPTS/menus/main_menu.sh" fi From c07ada1fc4f4aebaac9bac780cd68c4f7eaa6e36 Mon Sep 17 00:00:00 2001 From: cod378 Date: Mon, 3 Nov 2025 01:14:54 +0000 Subject: [PATCH 040/114] refactor: switch from remote to local script execution --- scripts/menus/share_menu.sh | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/scripts/menus/share_menu.sh b/scripts/menus/share_menu.sh index dca0f06..1bc7217 100644 --- a/scripts/menus/share_menu.sh +++ b/scripts/menus/share_menu.sh @@ -10,7 +10,7 @@ # ========================================================== # Configuration -REPO_URL="https://raw.githubusercontent.com/MacRimi/ProxMenux/main" +LOCAL_SCRIPTS="/usr/local/share/proxmenux/scripts" BASE_DIR="/usr/local/share/proxmenux" UTILS_FILE="$BASE_DIR/utils.sh" VENV_PATH="/opt/googletrans-env" @@ -43,7 +43,7 @@ while true; do "h" "$(translate "Help & Info (commands)")" \ "0" "$(translate "Return to Main Menu")" \ 2>&1 >/dev/tty - ) || { exec bash <(curl -s "$REPO_URL/scripts/menus/main_menu.sh"); } + ) || { exec bash "$LOCAL_SCRIPTS/menus/main_menu.sh"; } case "$OPTION" in @@ -52,37 +52,37 @@ while true; do ;; 1) - bash <(curl -s "$REPO_URL/scripts/share/nfs_host.sh") + bash "$LOCAL_SCRIPTS/share/nfs_host.sh" ;; 2) - bash <(curl -s "$REPO_URL/scripts/share/samba_host.sh") + bash "$LOCAL_SCRIPTS/share/samba_host.sh" ;; 3) - bash <(curl -s "$REPO_URL/scripts/share/local-shared-manager.sh") + bash "$LOCAL_SCRIPTS/share/local-shared-manager.sh" ;; 4) - bash <(curl -s "$REPO_URL/scripts/share/lxc-mount-manager_minimal.sh") + bash "$LOCAL_SCRIPTS/share/lxc-mount-manager_minimal.sh" ;; 5) - bash <(curl -s "$REPO_URL/scripts/share/nfs_client.sh") + bash "$LOCAL_SCRIPTS/share/nfs_client.sh" ;; 6) - bash <(curl -s "$REPO_URL/scripts/share/samba_client.sh") + bash "$LOCAL_SCRIPTS/share/samba_client.sh" ;; 7) - bash <(curl -s "$REPO_URL/scripts/share/nfs_lxc_server.sh") + bash "$LOCAL_SCRIPTS/share/nfs_lxc_server.sh" ;; 8) - bash <(curl -s "$REPO_URL/scripts/share/samba_lxc_server.sh") + bash "$LOCAL_SCRIPTS/share/samba_lxc_server.sh" ;; h) - bash <(curl -s "$REPO_URL/scripts/share/commands_share.sh") + bash "$LOCAL_SCRIPTS/share/commands_share.sh" ;; 0) - exec bash <(curl -s "$REPO_URL/scripts/menus/main_menu.sh") + exec bash "$LOCAL_SCRIPTS/menus/main_menu.sh" ;; *) - exec bash <(curl -s "$REPO_URL/scripts/menus/main_menu.sh") + exec bash "$LOCAL_SCRIPTS/menus/main_menu.sh" ;; esac done From af72c7a2d36b0a90ea159df8c2588051b41fd5d4 Mon Sep 17 00:00:00 2001 From: cod378 Date: Mon, 3 Nov 2025 01:16:32 +0000 Subject: [PATCH 041/114] refactor: switch from remote URLs to local script paths --- scripts/menus/sm.sh | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/scripts/menus/sm.sh b/scripts/menus/sm.sh index 463a4a3..b256b7b 100644 --- a/scripts/menus/sm.sh +++ b/scripts/menus/sm.sh @@ -12,7 +12,7 @@ # Configuration ============================================ -REPO_URL="https://raw.githubusercontent.com/MacRimi/ProxMenux/main" +LOCAL_SCRIPTS="/usr/local/share/proxmenux/scripts" BASE_DIR="/usr/local/share/proxmenux" UTILS_FILE="$BASE_DIR/utils.sh" VENV_PATH="/opt/googletrans-env" @@ -39,38 +39,37 @@ while true; do case $OPTION in 1) msg_info2 "$(translate "Running script: Add Disk Passthrough to a VM")..." - bash <(curl -s "$REPO_URL/scripts/storage/disk-passthrough.sh") + bash "$LOCAL_SCRIPTS/storage/disk-passthrough.sh" ;; 2) msg_info2 "$(translate "Running script: Add Disk Passthrough to a CT")..." - bash <(curl -s "$REPO_URL/scripts/storage/disk-passthrough_ct.sh") + bash "$LOCAL_SCRIPTS/storage/disk-passthrough_ct.sh" ;; 3) msg_info2 "$(translate "Running script: Import Disk Image to a VM")..." - bash <(curl -s "$REPO_URL/scripts/storage/import-disk-image.sh") + bash "$LOCAL_SCRIPTS/storage/import-disk-image.sh" ;; 4) msg_info2 "$(translate "Running script: Mount point to CT")..." - bash <(curl -s "$REPO_URL/scripts/storage/mount-point-to-ct.sh") + bash "$LOCAL_SCRIPTS/storage/mount-point-to-ct.sh" ;; 5) msg_info2 "$(translate "Running script: Mount disk on HOST")..." - bash <(curl -s "$REPO_URL/scripts/storage/mount-disk-on-host.sh") + bash "$LOCAL_SCRIPTS/storage/mount-disk-on-host.sh" ;; 6) msg_info2 "$(translate "Running script: Unmount disk from HOST")..." - bash <(curl -s "$REPO_URL/scripts/storage/unmount-disk-from-host.sh") + bash "$LOCAL_SCRIPTS/storage/unmount-disk-from-host.sh" ;; 7) msg_info2 "$(translate "Running script: Format disk")..." - bash <(curl -s "$REPO_URL/scripts/storage/format-disk.sh") + bash "$LOCAL_SCRIPTS/storage/format-disk.sh" ;; 8) - exec bash <(curl -s "$REPO_URL/scripts/menus/main_menu.sh") + exec bash "$LOCAL_SCRIPTS/menus/main_menu.sh" ;; *) - exec bash <(curl -s "$REPO_URL/scripts/menus/main_menu.sh") + exec bash "$LOCAL_SCRIPTS/menus/main_menu.sh" ;; esac done - From 3275a1ecb41f796e69d925813fc1ef9ad2025aaf Mon Sep 17 00:00:00 2001 From: cod378 Date: Mon, 3 Nov 2025 01:17:21 +0000 Subject: [PATCH 042/114] refactor: replace remote script loading with local paths --- scripts/menus/storage_menu.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/scripts/menus/storage_menu.sh b/scripts/menus/storage_menu.sh index 3537a0e..f2a1829 100644 --- a/scripts/menus/storage_menu.sh +++ b/scripts/menus/storage_menu.sh @@ -12,7 +12,7 @@ # Configuration ============================================ -REPO_URL="https://raw.githubusercontent.com/MacRimi/ProxMenux/main" +LOCAL_SCRIPTS="/usr/local/share/proxmenux/scripts" BASE_DIR="/usr/local/share/proxmenux" UTILS_FILE="$BASE_DIR/utils.sh" VENV_PATH="/opt/googletrans-env" @@ -36,19 +36,19 @@ while true; do case $OPTION in 1) - bash <(curl -s "$REPO_URL/scripts/storage/disk-passthrough.sh") + bash "$LOCAL_SCRIPTS/storage/disk-passthrough.sh" ;; 2) - bash <(curl -s "$REPO_URL/scripts/storage/disk-passthrough_ct.sh") + bash "$LOCAL_SCRIPTS/storage/disk-passthrough_ct.sh" ;; 3) - bash <(curl -s "$REPO_URL/scripts/storage/import-disk-image.sh") + bash "$LOCAL_SCRIPTS/storage/import-disk-image.sh" ;; 4) - exec bash <(curl -s "$REPO_URL/scripts/menus/main_menu.sh") + exec bash "$LOCAL_SCRIPTS/menus/main_menu.sh" ;; *) - exec bash <(curl -s "$REPO_URL/scripts/menus/main_menu.sh") + exec bash "$LOCAL_SCRIPTS/menus/main_menu.sh" ;; esac done From 60a97e58156c1d0b34514313fe3127507bba0b23 Mon Sep 17 00:00:00 2001 From: cod378 Date: Mon, 3 Nov 2025 01:20:11 +0000 Subject: [PATCH 043/114] feat: replace remote script fetching with local file execution --- scripts/menus/utilities_menu.sh | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/scripts/menus/utilities_menu.sh b/scripts/menus/utilities_menu.sh index 86a6f96..807e3ca 100644 --- a/scripts/menus/utilities_menu.sh +++ b/scripts/menus/utilities_menu.sh @@ -12,7 +12,7 @@ # Configuration ============================================ -REPO_URL="https://raw.githubusercontent.com/MacRimi/ProxMenux/main" +LOCAL_SCRIPTS="/usr/local/share/proxmenux/scripts" BASE_DIR="/usr/local/share/proxmenux" UTILS_FILE="$BASE_DIR/utils.sh" VENV_PATH="/opt/googletrans-env" @@ -36,13 +36,13 @@ initialize_cache case $OPTION in 1) - bash <(curl -s "$REPO_URL/scripts/utilities/uup_dump_iso_creator.sh") + bash "$LOCAL_SCRIPTS/utilities/uup_dump_iso_creator.sh" if [ $? -ne 0 ]; then return fi ;; 2) - bash <(curl -s "$REPO_URL/scripts/utilities/system_utils.sh") + bash "$LOCAL_SCRIPTS/utilities/system_utils.sh" if [ $? -ne 0 ]; then return fi @@ -64,19 +64,20 @@ initialize_cache dialog_result=$? if [[ $dialog_result -eq 0 ]]; then - bash <(curl -s "$REPO_URL/scripts/utilities/proxmox_update.sh") + bash "$LOCAL_SCRIPTS/utilities/proxmox_update.sh" if [ $? -ne 0 ]; then return fi fi ;; 4) - bash <(curl -s "$REPO_URL/scripts/utilities/upgrade_pve8_to_pve9.sh") + bash "$LOCAL_SCRIPTS/utilities/upgrade_pve8_to_pve9.sh" if [ $? -ne 0 ]; then return fi ;; - 5) exec bash <(curl -s "$REPO_URL/scripts/menus/main_menu.sh") ;; - *) exec bash <(curl -s "$REPO_URL/scripts/menus/main_menu.sh") ;; + 5) exec bash "$LOCAL_SCRIPTS/menus/main_menu.sh" ;; + *) exec bash "$LOCAL_SCRIPTS/menus/main_menu.sh" ;; esac - done \ No newline at end of file + done + \ No newline at end of file From ba984592ed34a591e3b22175cbc33c734ed387d4 Mon Sep 17 00:00:00 2001 From: cod378 Date: Mon, 3 Nov 2025 01:22:24 +0000 Subject: [PATCH 044/114] refactor: replace remote script fetching with local file execution --- scripts/post_install/auto_post_install.sh | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/scripts/post_install/auto_post_install.sh b/scripts/post_install/auto_post_install.sh index cdc3b04..e6d5a44 100644 --- a/scripts/post_install/auto_post_install.sh +++ b/scripts/post_install/auto_post_install.sh @@ -36,7 +36,7 @@ # Configuration -REPO_URL="https://raw.githubusercontent.com/MacRimi/ProxMenux/main" +LOCAL_SCRIPTS="/usr/local/share/proxmenux/scripts" BASE_DIR="/usr/local/share/proxmenux" UTILS_FILE="$BASE_DIR/utils.sh" VENV_PATH="/opt/googletrans-env" @@ -107,16 +107,11 @@ apt_upgrade() { if [[ "$pve_version" -ge 9 ]]; then - bash <(curl -fsSL "$REPO_URL/scripts/global/update-pve9_2.sh") + bash "$LOCAL_SCRIPTS/global/update-pve9_2.sh" else - bash <(curl -fsSL "$REPO_URL/scripts/global/update-pve8.sh") + bash "$LOCAL_SCRIPTS/global/update-pve8.sh" fi - - - - - } # ========================================================== @@ -147,14 +142,14 @@ remove_subscription_banner() { msg_warn "Banner removal cancelled by user." return 1 fi - bash <(curl -fsSL "$REPO_URL/scripts/global/remove-banner-pve-v3.sh") + bash "$LOCAL_SCRIPTS/global/remove-banner-pve-v3.sh" else if ! whiptail --title "Proxmox VE 8.x Subscription Banner Removal" \ --yesno "Do you want to remove the Proxmox subscription banner from the web interface for PVE $pve_version?" 10 70; then msg_warn "Banner removal cancelled by user." return 1 fi - bash <(curl -fsSL "$REPO_URL/scripts/global/remove-banner-pve8.sh") + bash "$LOCAL_SCRIPTS/global/remove-banner-pve8.sh" fi } From 51302a7c5a1b1d39d71f3b12d38964af75089250 Mon Sep 17 00:00:00 2001 From: cod378 Date: Mon, 3 Nov 2025 01:25:19 +0000 Subject: [PATCH 045/114] refactor: switch from remote URLs to local script execution --- scripts/post_install/customizable_post_install.sh | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/scripts/post_install/customizable_post_install.sh b/scripts/post_install/customizable_post_install.sh index a9d48ed..63cebc9 100644 --- a/scripts/post_install/customizable_post_install.sh +++ b/scripts/post_install/customizable_post_install.sh @@ -49,7 +49,7 @@ # Configuration -REPO_URL="https://raw.githubusercontent.com/MacRimi/ProxMenux/main" +LOCAL_SCRIPTS="/usr/local/share/proxmenux/scripts" BASE_DIR="/usr/local/share/proxmenux" UTILS_FILE="$BASE_DIR/utils.sh" VENV_PATH="/opt/googletrans-env" @@ -194,10 +194,10 @@ apt_upgrade() { if [[ "$pve_version" -ge 9 ]]; then - bash <(curl -fsSL "$REPO_URL/scripts/global/update-pve9_2.sh") + bash "$LOCAL_SCRIPTS/global/update-pve9_2.sh" else - bash <(curl -fsSL "$REPO_URL/scripts/global/update-pve8.sh") + bash "$LOCAL_SCRIPTS/global/update-pve8.sh" fi @@ -2902,10 +2902,10 @@ remove_subscription_banner() { if [[ "$pve_version" -ge 9 ]]; then - bash <(curl -fsSL "$REPO_URL/scripts/global/remove-banner-pve-v3.sh") + bash "$LOCAL_SCRIPTS/global/remove-banner-pve-v3.sh" else - bash <(curl -fsSL "$REPO_URL/scripts/global/remove-banner-pve8.sh") + bash "$LOCAL_SCRIPTS/global/remove-banner-pve8.sh" fi } @@ -4366,4 +4366,3 @@ done check_extremeshok_warning main_menu - From 4ebbdb284b662604748daa813a17a34293a564ba Mon Sep 17 00:00:00 2001 From: cod378 Date: Mon, 3 Nov 2025 01:26:28 +0000 Subject: [PATCH 046/114] refactor: switch from remote URLs to local script execution --- scripts/post_install/uninstall-tools.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/post_install/uninstall-tools.sh b/scripts/post_install/uninstall-tools.sh index 036616c..50f8427 100644 --- a/scripts/post_install/uninstall-tools.sh +++ b/scripts/post_install/uninstall-tools.sh @@ -20,8 +20,8 @@ # ========================================================== -REPO_URL="https://raw.githubusercontent.com/MacRimi/ProxMenux/main" -RETURN_SCRIPT="$REPO_URL/scripts/menus/menu_post_install.sh" +LOCAL_SCRIPTS="/usr/local/share/proxmenux/scripts" +RETURN_SCRIPT="$LOCAL_SCRIPTS/menus/menu_post_install.sh" BASE_DIR="/usr/local/share/proxmenux" UTILS_FILE="$BASE_DIR/utils.sh" TOOLS_JSON="$BASE_DIR/installed_tools.json" From fa1e6c6c64d61e726c2402925a6fd8c15b270d1f Mon Sep 17 00:00:00 2001 From: cod378 Date: Mon, 3 Nov 2025 01:27:37 +0000 Subject: [PATCH 047/114] refactor: switch from remote URLs to local script execution --- scripts/share/commands_share.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/share/commands_share.sh b/scripts/share/commands_share.sh index 94fe5f9..9f2bfc8 100644 --- a/scripts/share/commands_share.sh +++ b/scripts/share/commands_share.sh @@ -11,7 +11,7 @@ # ========================================================== # Configuration ============================================ -REPO_URL="https://raw.githubusercontent.com/MacRimi/ProxMenux/main" +LOCAL_SCRIPTS="/usr/local/share/proxmenux/scripts" BASE_DIR="/usr/local/share/proxmenux" UTILS_FILE="$BASE_DIR/utils.sh" VENV_PATH="/opt/googletrans-env" From 44cc89b9d58d02ba871ba70bfe01a50579e36716 Mon Sep 17 00:00:00 2001 From: cod378 Date: Mon, 3 Nov 2025 01:33:04 +0000 Subject: [PATCH 048/114] refactor: switch from remote URLs to local file paths --- scripts/share/local-shared-manager.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/share/local-shared-manager.sh b/scripts/share/local-shared-manager.sh index e9158ce..a25e86b 100644 --- a/scripts/share/local-shared-manager.sh +++ b/scripts/share/local-shared-manager.sh @@ -10,7 +10,7 @@ # ========================================================== # Configuration -REPO_URL="https://raw.githubusercontent.com/MacRimi/ProxMenux/main" +LOCAL_SCRIPTS="/usr/local/share/proxmenux/scripts" BASE_DIR="/usr/local/share/proxmenux" UTILS_FILE="$BASE_DIR/utils.sh" @@ -21,8 +21,8 @@ if [[ -f "$UTILS_FILE" ]]; then fi -SHARE_COMMON_URL="https://raw.githubusercontent.com/MacRimi/ProxMenux/main/scripts/global/share-common.func" -if ! source <(curl -s "$SHARE_COMMON_URL" 2>/dev/null); then +SHARE_COMMON_FILE="$LOCAL_SCRIPTS/global/share-common.func" +if ! source "$SHARE_COMMON_FILE" 2>/dev/null; then SHARE_COMMON_LOADED=false else SHARE_COMMON_LOADED=true From bff07311b2c3251459c29279367942407b7c4173 Mon Sep 17 00:00:00 2001 From: cod378 Date: Mon, 3 Nov 2025 01:34:44 +0000 Subject: [PATCH 049/114] refactor: switch from remote URLs to local script execution --- scripts/share/nfs_client.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/share/nfs_client.sh b/scripts/share/nfs_client.sh index f10ba76..6e1cc96 100644 --- a/scripts/share/nfs_client.sh +++ b/scripts/share/nfs_client.sh @@ -13,7 +13,7 @@ # ========================================================== # Configuration -REPO_URL="https://raw.githubusercontent.com/MacRimi/ProxMenux/main" +LOCAL_SCRIPTS="/usr/local/share/proxmenux/scripts" BASE_DIR="/usr/local/share/proxmenux" UTILS_FILE="$BASE_DIR/utils.sh" @@ -22,8 +22,8 @@ if [[ -f "$UTILS_FILE" ]]; then fi # Load shared functions -SHARE_COMMON_URL="https://raw.githubusercontent.com/MacRimi/ProxMenux/main/scripts/global/share-common.func" -if ! source <(curl -s "$SHARE_COMMON_URL" 2>/dev/null); then +SHARE_COMMON_FILE="$LOCAL_SCRIPTS/global/share-common.func" +if ! source "$SHARE_COMMON_FILE" 2>/dev/null; then msg_error "$(translate "Could not load shared functions. Script cannot continue.")" exit 1 fi @@ -684,4 +684,4 @@ while true; do 5) exit 0 ;; *) exit 0 ;; esac -done \ No newline at end of file +done From 02b5cd61bdddeb0f68c1beb57efbd57af5955332 Mon Sep 17 00:00:00 2001 From: cod378 Date: Mon, 3 Nov 2025 01:36:57 +0000 Subject: [PATCH 050/114] refactor: switch from remote URLs to local script execution --- scripts/share/nfs_host.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/share/nfs_host.sh b/scripts/share/nfs_host.sh index b0b8316..4446a1d 100644 --- a/scripts/share/nfs_host.sh +++ b/scripts/share/nfs_host.sh @@ -13,7 +13,7 @@ # ========================================================== # Configuration -REPO_URL="https://raw.githubusercontent.com/MacRimi/ProxMenux/main" +LOCAL_SCRIPTS="/usr/local/share/proxmenux/scripts" BASE_DIR="/usr/local/share/proxmenux" UTILS_FILE="$BASE_DIR/utils.sh" VENV_PATH="/opt/googletrans-env" @@ -26,8 +26,8 @@ load_language initialize_cache # Load common share functions -SHARE_COMMON_URL="https://raw.githubusercontent.com/MacRimi/ProxMenux/main/scripts/global/share-common.func" -if ! source <(curl -s "$SHARE_COMMON_URL" 2>/dev/null); then +SHARE_COMMON_FILE="$LOCAL_SCRIPTS/global/share-common.func" +if ! source "$SHARE_COMMON_FILE" 2>/dev/null; then msg_warn "$(translate "Could not load shared functions. Using fallback methods.")" SHARE_COMMON_LOADED=false else From 4572478ad8f3fec2e90476dbe60e3a525d22b848 Mon Sep 17 00:00:00 2001 From: cod378 Date: Mon, 3 Nov 2025 01:38:05 +0000 Subject: [PATCH 051/114] refactor: switch from remote URLs to local script execution --- scripts/share/nfs_lxc_server.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/share/nfs_lxc_server.sh b/scripts/share/nfs_lxc_server.sh index 4005b7b..5b9000a 100644 --- a/scripts/share/nfs_lxc_server.sh +++ b/scripts/share/nfs_lxc_server.sh @@ -13,7 +13,7 @@ # ========================================================== # Configuration -REPO_URL="https://raw.githubusercontent.com/MacRimi/ProxMenux/main" +LOCAL_SCRIPTS="/usr/local/share/proxmenux/scripts" BASE_DIR="/usr/local/share/proxmenux" UTILS_FILE="$BASE_DIR/utils.sh" @@ -22,8 +22,8 @@ if [[ -f "$UTILS_FILE" ]]; then fi # Load shared functions -SHARE_COMMON_URL="https://raw.githubusercontent.com/MacRimi/ProxMenux/main/scripts/global/share-common.func" -if ! source <(curl -s "$SHARE_COMMON_URL" 2>/dev/null); then +SHARE_COMMON_FILE="$LOCAL_SCRIPTS/global/share-common.func" +if ! source "$SHARE_COMMON_FILE" 2>/dev/null; then msg_error "$(translate "Could not load shared functions. Script cannot continue.")" exit 1 fi From 16c7513e82299bea54e66b02d6107eac26e94550 Mon Sep 17 00:00:00 2001 From: cod378 Date: Mon, 3 Nov 2025 01:39:15 +0000 Subject: [PATCH 052/114] refactor: switch from remote URLs to local script execution --- scripts/share/samba_client.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/share/samba_client.sh b/scripts/share/samba_client.sh index fd4867e..7f193f0 100644 --- a/scripts/share/samba_client.sh +++ b/scripts/share/samba_client.sh @@ -15,7 +15,7 @@ # Configuration -REPO_URL="https://raw.githubusercontent.com/MacRimi/ProxMenux/main" +LOCAL_SCRIPTS="/usr/local/share/proxmenux/scripts" BASE_DIR="/usr/local/share/proxmenux" UTILS_FILE="$BASE_DIR/utils.sh" VENV_PATH="/opt/googletrans-env" @@ -26,8 +26,8 @@ if [[ -f "$UTILS_FILE" ]]; then fi -SHARE_COMMON_URL="https://raw.githubusercontent.com/MacRimi/ProxMenux/main/scripts/global/share-common.func" -if ! source <(curl -s "$SHARE_COMMON_URL" 2>/dev/null); then +SHARE_COMMON_FILE="$LOCAL_SCRIPTS/global/share-common.func" +if ! source "$SHARE_COMMON_FILE" 2>/dev/null; then msg_error "$(translate "Could not load shared functions. Script cannot continue.")" exit 1 fi @@ -1082,4 +1082,4 @@ while true; do 5) exit 0 ;; *) exit 0 ;; esac -done \ No newline at end of file +done From 4359d92ffe61d6ba8266397568947356db00ee7d Mon Sep 17 00:00:00 2001 From: cod378 Date: Mon, 3 Nov 2025 01:40:38 +0000 Subject: [PATCH 053/114] refactor: switch from remote URLs to local script execution --- scripts/share/samba_host.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/share/samba_host.sh b/scripts/share/samba_host.sh index 93f1a86..552b9ad 100644 --- a/scripts/share/samba_host.sh +++ b/scripts/share/samba_host.sh @@ -13,7 +13,7 @@ # ========================================================== # Configuration -REPO_URL="https://raw.githubusercontent.com/MacRimi/ProxMenux/main" +LOCAL_SCRIPTS="/usr/local/share/proxmenux/scripts" BASE_DIR="/usr/local/share/proxmenux" UTILS_FILE="$BASE_DIR/utils.sh" CREDENTIALS_DIR="/etc/samba/credentials" @@ -26,8 +26,8 @@ load_language initialize_cache # Load common share functions -SHARE_COMMON_URL="https://raw.githubusercontent.com/MacRimi/ProxMenux/main/scripts/global/share-common.func" -if ! source <(curl -s "$SHARE_COMMON_URL" 2>/dev/null); then +SHARE_COMMON_FILE="$LOCAL_SCRIPTS/global/share-common.func" +if ! source "$SHARE_COMMON_FILE" 2>/dev/null; then msg_warn "$(translate "Could not load shared functions. Using fallback methods.")" SHARE_COMMON_LOADED=false else From ba88c7b0f69b2474372ad5d5bebe381b8af9bd45 Mon Sep 17 00:00:00 2001 From: cod378 Date: Mon, 3 Nov 2025 01:41:39 +0000 Subject: [PATCH 054/114] refactor: switch from remote URLs to local script execution --- scripts/share/samba_lxc_server.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/share/samba_lxc_server.sh b/scripts/share/samba_lxc_server.sh index ac096c3..bcc3c98 100644 --- a/scripts/share/samba_lxc_server.sh +++ b/scripts/share/samba_lxc_server.sh @@ -13,7 +13,7 @@ # ========================================================== # Configuration -REPO_URL="https://raw.githubusercontent.com/MacRimi/ProxMenux/main" +LOCAL_SCRIPTS="/usr/local/share/proxmenux/scripts" BASE_DIR="/usr/local/share/proxmenux" UTILS_FILE="$BASE_DIR/utils.sh" VENV_PATH="/opt/googletrans-env" @@ -24,8 +24,8 @@ if [[ -f "$UTILS_FILE" ]]; then fi -SHARE_COMMON_URL="https://raw.githubusercontent.com/MacRimi/ProxMenux/main/scripts/global/share-common.func" -if ! source <(curl -s "$SHARE_COMMON_URL" 2>/dev/null); then +SHARE_COMMON_FILE="$LOCAL_SCRIPTS/global/share-common.func" +if ! source "$SHARE_COMMON_FILE" 2>/dev/null; then msg_error "$(translate "Could not load shared functions. Script cannot continue.")" exit 1 fi @@ -573,4 +573,4 @@ while true; do 6) exit 0 ;; *) exit 0 ;; esac -done \ No newline at end of file +done From 43d79bd1e9d0aa0435508b83002a91e33f11b56b Mon Sep 17 00:00:00 2001 From: cod378 Date: Mon, 3 Nov 2025 01:44:06 +0000 Subject: [PATCH 055/114] refactor: switch from remote URLs to local script execution (unused path) --- scripts/storage/disk-passthrough_ct.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/storage/disk-passthrough_ct.sh b/scripts/storage/disk-passthrough_ct.sh index b199211..9d760be 100644 --- a/scripts/storage/disk-passthrough_ct.sh +++ b/scripts/storage/disk-passthrough_ct.sh @@ -20,7 +20,7 @@ # ========================================================== # Configuration ============================================ -REPO_URL="https://raw.githubusercontent.com/MacRimi/ProxMenux/main" +LOCAL_SCRIPTS="/usr/local/share/proxmenux/scripts" BASE_DIR="/usr/local/share/proxmenux" UTILS_FILE="$BASE_DIR/utils.sh" VENV_PATH="/opt/googletrans-env" From c816688de37d100d748a0fd5fe365697893aa614 Mon Sep 17 00:00:00 2001 From: cod378 Date: Mon, 3 Nov 2025 01:44:48 +0000 Subject: [PATCH 056/114] refactor: switch from remote URLs to local script execution (unused path) --- scripts/storage/disk-passthrough.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/storage/disk-passthrough.sh b/scripts/storage/disk-passthrough.sh index 889ab19..2535ff0 100644 --- a/scripts/storage/disk-passthrough.sh +++ b/scripts/storage/disk-passthrough.sh @@ -28,7 +28,7 @@ # Configuration ============================================ -REPO_URL="https://raw.githubusercontent.com/MacRimi/ProxMenux/main" +LOCAL_SCRIPTS="/usr/local/share/proxmenux/scripts" BASE_DIR="/usr/local/share/proxmenux" UTILS_FILE="$BASE_DIR/utils.sh" VENV_PATH="/opt/googletrans-env" From 25635239d4a10a01943578c65fd43a3b7888c4c3 Mon Sep 17 00:00:00 2001 From: cod378 Date: Mon, 3 Nov 2025 01:45:43 +0000 Subject: [PATCH 057/114] refactor: switch from remote URLs to local script execution (unused path) --- scripts/storage/format-disk.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/storage/format-disk.sh b/scripts/storage/format-disk.sh index 93fcb1a..343cdd2 100644 --- a/scripts/storage/format-disk.sh +++ b/scripts/storage/format-disk.sh @@ -14,7 +14,7 @@ # Configuration ============================================ -REPO_URL="https://raw.githubusercontent.com/MacRimi/ProxMenux/main" +LOCAL_SCRIPTS="/usr/local/share/proxmenux/scripts" BASE_DIR="/usr/local/share/proxmenux" UTILS_FILE="$BASE_DIR/utils.sh" VENV_PATH="/opt/googletrans-env" From fa1c49871615f02c3a2eddf2e52dcb552a3cf39c Mon Sep 17 00:00:00 2001 From: cod378 Date: Mon, 3 Nov 2025 01:46:19 +0000 Subject: [PATCH 058/114] refactor: switch from remote URLs to local script execution (unused path) --- scripts/storage/import-disk-image.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/storage/import-disk-image.sh b/scripts/storage/import-disk-image.sh index 7b6bc41..35bf28e 100644 --- a/scripts/storage/import-disk-image.sh +++ b/scripts/storage/import-disk-image.sh @@ -27,7 +27,7 @@ # ========================================================== # Configuration ============================================ -REPO_URL="https://raw.githubusercontent.com/MacRimi/ProxMenux/main" +LOCAL_SCRIPTS="/usr/local/share/proxmenux/scripts" BASE_DIR="/usr/local/share/proxmenux" UTILS_FILE="$BASE_DIR/utils.sh" VENV_PATH="/opt/googletrans-env" From d24884f65166ee97aae600ef3188bd7f8b037468 Mon Sep 17 00:00:00 2001 From: cod378 Date: Mon, 3 Nov 2025 01:46:50 +0000 Subject: [PATCH 059/114] refactor: switch from remote URLs to local script execution (unused path) --- scripts/storage/mount_disk_host_bk.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/storage/mount_disk_host_bk.sh b/scripts/storage/mount_disk_host_bk.sh index 325e949..df08533 100644 --- a/scripts/storage/mount_disk_host_bk.sh +++ b/scripts/storage/mount_disk_host_bk.sh @@ -10,7 +10,7 @@ # Last Updated: 13/12/2024 # ========================================================== -REPO_URL="https://raw.githubusercontent.com/MacRimi/ProxMenux/main" +LOCAL_SCRIPTS="/usr/local/share/proxmenux/scripts" BASE_DIR="/usr/local/share/proxmenux" UTILS_FILE="$BASE_DIR/utils.sh" VENV_PATH="/opt/googletrans-env" From 9ad092d3400ab51caba5489c988f1658083cf079 Mon Sep 17 00:00:00 2001 From: cod378 Date: Mon, 3 Nov 2025 01:47:17 +0000 Subject: [PATCH 060/114] refactor: switch from remote URLs to local script execution (unused path) --- scripts/storage/mount-disk-on-host.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/storage/mount-disk-on-host.sh b/scripts/storage/mount-disk-on-host.sh index e28d871..fdb4d7d 100644 --- a/scripts/storage/mount-disk-on-host.sh +++ b/scripts/storage/mount-disk-on-host.sh @@ -20,7 +20,7 @@ # ========================================================== # Configuration ============================================ -REPO_URL="https://raw.githubusercontent.com/MacRimi/ProxMenux/main" +LOCAL_SCRIPTS="/usr/local/share/proxmenux/scripts" BASE_DIR="/usr/local/share/proxmenux" UTILS_FILE="$BASE_DIR/utils.sh" VENV_PATH="/opt/googletrans-env" From 036a2b90146585c6b202f8fe83900c9eb8dadc44 Mon Sep 17 00:00:00 2001 From: cod378 Date: Mon, 3 Nov 2025 01:47:52 +0000 Subject: [PATCH 061/114] refactor: switch from remote URLs to local script execution (unused path) --- scripts/storage/mount-point-to-ct.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/storage/mount-point-to-ct.sh b/scripts/storage/mount-point-to-ct.sh index 1bf3064..13dba7c 100644 --- a/scripts/storage/mount-point-to-ct.sh +++ b/scripts/storage/mount-point-to-ct.sh @@ -8,7 +8,7 @@ # Description : Mount a folder from /mnt on the host to a mount point in a CT # ========================================================== -REPO_URL="https://raw.githubusercontent.com/MacRimi/ProxMenux/main" +LOCAL_SCRIPTS="/usr/local/share/proxmenux/scripts" BASE_DIR="/usr/local/share/proxmenux" UTILS_FILE="$BASE_DIR/utils.sh" From 641721d19943839a858727ff6a2f3024a34624c9 Mon Sep 17 00:00:00 2001 From: cod378 Date: Mon, 3 Nov 2025 01:48:35 +0000 Subject: [PATCH 062/114] refactor: switch from remote URLs to local script execution (unused path) --- scripts/storage/unmount-disk-from-host.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/storage/unmount-disk-from-host.sh b/scripts/storage/unmount-disk-from-host.sh index 1e325b1..c57b0c9 100644 --- a/scripts/storage/unmount-disk-from-host.sh +++ b/scripts/storage/unmount-disk-from-host.sh @@ -11,7 +11,7 @@ # Description : Allows unmounting a previously mounted disk # ========================================================== -REPO_URL="https://raw.githubusercontent.com/MacRimi/ProxMenux/main" +LOCAL_SCRIPTS="/usr/local/share/proxmenux/scripts" BASE_DIR="/usr/local/share/proxmenux" UTILS_FILE="$BASE_DIR/utils.sh" From 6293556837e0ac80b1a6af48e7ea787302431b59 Mon Sep 17 00:00:00 2001 From: cod378 Date: Mon, 3 Nov 2025 01:51:06 +0000 Subject: [PATCH 063/114] refactor: switch from remote URLs to local script execution (unused path) --- scripts/test/vm/synology4.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/test/vm/synology4.sh b/scripts/test/vm/synology4.sh index fe94ae4..08af512 100644 --- a/scripts/test/vm/synology4.sh +++ b/scripts/test/vm/synology4.sh @@ -29,7 +29,7 @@ # Configuration ============================================ -REPO_URL="https://raw.githubusercontent.com/MacRimi/ProxMenux/main" +LOCAL_SCRIPTS="/usr/local/share/proxmenux/scripts" BASE_DIR="/usr/local/share/proxmenux" UTILS_FILE="$BASE_DIR/utils.sh" VENV_PATH="/opt/googletrans-env" From 2c6d2f425565b764f304de497b9186ad1ac5c244 Mon Sep 17 00:00:00 2001 From: cod378 Date: Mon, 3 Nov 2025 01:51:24 +0000 Subject: [PATCH 064/114] refactor: switch from remote URLs to local script execution (unused path) --- scripts/test/vm/synology5.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/test/vm/synology5.sh b/scripts/test/vm/synology5.sh index 41830ec..57c6767 100644 --- a/scripts/test/vm/synology5.sh +++ b/scripts/test/vm/synology5.sh @@ -29,7 +29,7 @@ # Configuration ============================================ -REPO_URL="https://raw.githubusercontent.com/MacRimi/ProxMenux/main" +LOCAL_SCRIPTS="/usr/local/share/proxmenux/scripts" BASE_DIR="/usr/local/share/proxmenux" UTILS_FILE="$BASE_DIR/utils.sh" VENV_PATH="/opt/googletrans-env" From 98bc8be6422f8b69ef34e78186725c2d0802b0ee Mon Sep 17 00:00:00 2001 From: cod378 Date: Mon, 3 Nov 2025 01:51:43 +0000 Subject: [PATCH 065/114] refactor: switch from remote URLs to local script execution (unused path) --- scripts/test/helpers-menu.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/test/helpers-menu.sh b/scripts/test/helpers-menu.sh index c29f627..ccb7c33 100644 --- a/scripts/test/helpers-menu.sh +++ b/scripts/test/helpers-menu.sh @@ -20,7 +20,7 @@ # Configuration ============================================ -REPO_URL="https://raw.githubusercontent.com/MacRimi/ProxMenux/main" +LOCAL_SCRIPTS="/usr/local/share/proxmenux/scripts" BASE_DIR="/usr/local/share/proxmenux" UTILS_FILE="$BASE_DIR/utils.sh" VENV_PATH="/opt/googletrans-env" From 042913e08087baa776eefc30455a2bbecd04af69 Mon Sep 17 00:00:00 2001 From: cod378 Date: Mon, 3 Nov 2025 01:51:57 +0000 Subject: [PATCH 066/114] refactor: switch from remote URLs to local script execution (unused path) --- scripts/test/id.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/test/id.sh b/scripts/test/id.sh index 4f5e215..1d9b361 100644 --- a/scripts/test/id.sh +++ b/scripts/test/id.sh @@ -28,7 +28,7 @@ # Configuration ============================================ -REPO_URL="https://raw.githubusercontent.com/MacRimi/ProxMenux/main" +LOCAL_SCRIPTS="/usr/local/share/proxmenux/scripts" BASE_DIR="/usr/local/share/proxmenux" UTILS_FILE="$BASE_DIR/utils.sh" VENV_PATH="/opt/googletrans-env" From 0d7ff46aecca5f43fe6f05efb84291e6e86da107 Mon Sep 17 00:00:00 2001 From: cod378 Date: Mon, 3 Nov 2025 01:53:10 +0000 Subject: [PATCH 067/114] refactor: switch from remote URLs to local script execution --- scripts/test/repair_network_safe.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/test/repair_network_safe.sh b/scripts/test/repair_network_safe.sh index 86e7236..e894d9f 100644 --- a/scripts/test/repair_network_safe.sh +++ b/scripts/test/repair_network_safe.sh @@ -14,7 +14,7 @@ # It avoids making changes if the system is already connected to the internet. # ========================================================== -REPO_URL="https://raw.githubusercontent.com/MacRimi/ProxMenux/main" +LOCAL_SCRIPTS="/usr/local/share/proxmenux/scripts" BASE_DIR="/usr/local/share/proxmenux" UTILS_FILE="$BASE_DIR/utils.sh" VENV_PATH="/opt/googletrans-env" @@ -183,8 +183,8 @@ show_main_menu() { 1) repair_network ;; 2) verify_network ;; 3) show_ip_info ;; - 4) exec bash <(curl -s "$REPO_URL/scripts/menus/main_menu.sh") ;; - *) exec bash <(curl -s "$REPO_URL/scripts/menus/main_menu.sh") ;; + 4) exec bash "$LOCAL_SCRIPTS/menus/main_menu.sh" ;; + *) exec bash "$LOCAL_SCRIPTS/menus/main_menu.sh" ;; esac done } From e33ef92334cc0838f4063e1e4daf5973d1cd71d2 Mon Sep 17 00:00:00 2001 From: cod378 Date: Mon, 3 Nov 2025 01:54:52 +0000 Subject: [PATCH 068/114] refactor: switch from remote URLs to local script execution --- scripts/utilities/proxmox_update.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/utilities/proxmox_update.sh b/scripts/utilities/proxmox_update.sh index db22a6e..e13ad9c 100644 --- a/scripts/utilities/proxmox_update.sh +++ b/scripts/utilities/proxmox_update.sh @@ -57,12 +57,12 @@ apt_upgrade() { if [[ "$pve_version" -ge 9 ]]; then show_proxmenux_logo msg_title "$(translate "$SCRIPT_TITLE")" - bash <(curl -fsSL "$REPO_URL/scripts/global/update-pve9_2.sh") + bash "$LOCAL_SCRIPTS/global/update-pve9_2.sh" else show_proxmenux_logo msg_title "$(translate "Proxmox system update")" - bash <(curl -fsSL "$REPO_URL/scripts/global/update-pve8.sh") + bash "$LOCAL_SCRIPTS/global/update-pve8.sh" fi From 050b95946c40b778cad2fd751df91e1ba368b2c0 Mon Sep 17 00:00:00 2001 From: cod378 Date: Mon, 3 Nov 2025 01:55:45 +0000 Subject: [PATCH 069/114] refactor: switch from remote URLs to local script execution (unused path) --- .../utilities/proxmox-upgrade-pve8-to-pve9-manual-guide.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/utilities/proxmox-upgrade-pve8-to-pve9-manual-guide.sh b/scripts/utilities/proxmox-upgrade-pve8-to-pve9-manual-guide.sh index e49f069..6431804 100644 --- a/scripts/utilities/proxmox-upgrade-pve8-to-pve9-manual-guide.sh +++ b/scripts/utilities/proxmox-upgrade-pve8-to-pve9-manual-guide.sh @@ -11,7 +11,7 @@ # ========================================================== # Configuration ============================================ -REPO_URL="https://raw.githubusercontent.com/MacRimi/ProxMenux/main" +LOCAL_SCRIPTS="/usr/local/share/proxmenux/scripts" BASE_DIR="/usr/local/share/proxmenux" UTILS_FILE="$BASE_DIR/utils.sh" VENV_PATH="/opt/googletrans-env" @@ -266,10 +266,10 @@ EOF${CL}" \ read -r clear exit 0 - #bash <(curl -fsSL "$REPO_URL/scripts/utilities/upgrade_pve8_to_pve9.sh") + #bash "$LOCAL_SCRIPTS/utilities/upgrade_pve8_to_pve9.sh" } # Main execution -show_proxmox_upgrade_manual_guide \ No newline at end of file +show_proxmox_upgrade_manual_guide From f2afc94ed28ba9cddaa0118eef76059aee63d12f Mon Sep 17 00:00:00 2001 From: cod378 Date: Mon, 3 Nov 2025 01:56:23 +0000 Subject: [PATCH 070/114] refactor: switch from remote URLs to local script execution (unused path) --- scripts/utilities/pve8to9_check.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/utilities/pve8to9_check.sh b/scripts/utilities/pve8to9_check.sh index 4c26183..4afdc25 100644 --- a/scripts/utilities/pve8to9_check.sh +++ b/scripts/utilities/pve8to9_check.sh @@ -9,7 +9,7 @@ # Last Updated: 14/08/2025 # ========================================================== -REPO_URL="https://raw.githubusercontent.com/MacRimi/ProxMenux/main" +LOCAL_SCRIPTS="/usr/local/share/proxmenux/scripts" BASE_DIR="/usr/local/share/proxmenux" UTILS_FILE="$BASE_DIR/utils.sh" From 9570819f59efb986a58757a33fd9962949599af3 Mon Sep 17 00:00:00 2001 From: cod378 Date: Mon, 3 Nov 2025 01:56:34 +0000 Subject: [PATCH 071/114] refactor: switch from remote URLs to local script execution (unused path) --- scripts/utilities/system_utils.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/utilities/system_utils.sh b/scripts/utilities/system_utils.sh index aa5377d..146f9c2 100644 --- a/scripts/utilities/system_utils.sh +++ b/scripts/utilities/system_utils.sh @@ -35,7 +35,7 @@ # # Configuration ============================================ -REPO_URL="https://raw.githubusercontent.com/MacRimi/ProxMenux/main" +LOCAL_SCRIPTS="/usr/local/share/proxmenux/scripts" BASE_DIR="/usr/local/share/proxmenux" UTILS_FILE="$BASE_DIR/utils.sh" VENV_PATH="/opt/googletrans-env" From 6df44f1632e02d49b0f844bb12f233826abcf022 Mon Sep 17 00:00:00 2001 From: cod378 Date: Mon, 3 Nov 2025 02:03:26 +0000 Subject: [PATCH 072/114] refactor: switch from remote URLs to local script execution --- scripts/utilities/upgrade_pve8_to_pve9.sh | 24 +++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/scripts/utilities/upgrade_pve8_to_pve9.sh b/scripts/utilities/upgrade_pve8_to_pve9.sh index 3eda01e..1f6efbf 100644 --- a/scripts/utilities/upgrade_pve8_to_pve9.sh +++ b/scripts/utilities/upgrade_pve8_to_pve9.sh @@ -9,7 +9,7 @@ # Last Updated: 14/08/2025 # ========================================================== -REPO_URL="https://raw.githubusercontent.com/MacRimi/ProxMenux/main" +LOCAL_SCRIPTS="/usr/local/share/proxmenux/scripts" BASE_DIR="/usr/local/share/proxmenux" UTILS_FILE="$BASE_DIR/utils.sh" @@ -49,21 +49,21 @@ done run_manual_guide() { - local url="$REPO_URL/scripts/utilities/proxmox-upgrade-pve8-to-pve9-manual-guide.sh" - if command -v curl >/dev/null 2>&1; then - bash <(curl -fsSL "$url") - else - bash <(wget -qO- "$url") + local SCRIPT_FILE="$LOCAL_SCRIPTS/utilities/proxmox-upgrade-pve8-to-pve9-manual-guide.sh" + if [[ ! -f "$SCRIPT_FILE" ]]; then + msg_error "$(translate "Manual guide script not found")" + return 1 fi + bash "$SCRIPT_FILE" } run_pve8to9_check() { - local url="$REPO_URL/scripts/utilities/pve8to9_check.sh" - if command -v curl >/dev/null 2>&1; then - bash <(curl -fsSL "$url") - else - bash <(wget -qO- "$url") + local SCRIPT_FILE="$LOCAL_SCRIPTS/utilities/pve8to9_check.sh" + if [[ ! -f "$SCRIPT_FILE" ]]; then + msg_error "$(translate "Check script not found")" + return 1 fi + bash "$SCRIPT_FILE" } ask_run_mode() { @@ -564,7 +564,7 @@ apt_upgrade() { exit 1 else - bash <(curl -fsSL "$REPO_URL/scripts/global/update-pve8.sh") + bash "$LOCAL_SCRIPTS/global/update-pve8.sh" hash -r fi From ffb8324b5aee5936bee008146c640268db3986c2 Mon Sep 17 00:00:00 2001 From: cod378 Date: Mon, 3 Nov 2025 02:06:43 +0000 Subject: [PATCH 073/114] refactor: switch from remote URLs to local script execution --- scripts/vm/create_vm.sh | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/scripts/vm/create_vm.sh b/scripts/vm/create_vm.sh index 25c1ee5..f739a51 100644 --- a/scripts/vm/create_vm.sh +++ b/scripts/vm/create_vm.sh @@ -26,10 +26,10 @@ -REPO_URL="https://raw.githubusercontent.com/MacRimi/ProxMenux/main" -VM_REPO="$REPO_URL/scripts/vm" -ISO_REPO="$REPO_URL/scripts/vm" -MENU_REPO="$REPO_URL/scripts/menus" +LOCAL_SCRIPTS="/usr/local/share/proxmenux/scripts" +VM_REPO="$LOCAL_SCRIPTS/vm" +ISO_REPO="$LOCAL_SCRIPTS/vm" +MENU_REPO="$LOCAL_SCRIPTS/menus" BASE_DIR="/usr/local/share/proxmenux" UTILS_FILE="$BASE_DIR/utils.sh" VENV_PATH="/opt/googletrans-env" @@ -37,9 +37,9 @@ VENV_PATH="/opt/googletrans-env" [[ -f "$UTILS_FILE" ]] && source "$UTILS_FILE" -source <(curl -s "$VM_REPO/vm_configurator.sh") -source <(curl -s "$VM_REPO/disk_selector.sh") -source <(curl -s "$VM_REPO/vm_creator.sh") +source "$VM_REPO/vm_configurator.sh" +source "$VM_REPO/disk_selector.sh" +source "$VM_REPO/vm_creator.sh" @@ -108,17 +108,17 @@ while true; do 3>&1 1>&2 2>&3) - [[ $? -ne 0 || "$OS_TYPE" == "5" ]] && exec bash <(curl -s "$MENU_REPO/main_menu.sh") + [[ $? -ne 0 || "$OS_TYPE" == "5" ]] && exec bash "$MENU_REPO/main_menu.sh" case "$OS_TYPE" in 1) - source <(curl -fsSL "$ISO_REPO/select_nas_iso.sh") && select_nas_iso || continue + source "$ISO_REPO/select_nas_iso.sh" && select_nas_iso || continue ;; 2) - source <(curl -fsSL "$ISO_REPO/select_windows_iso.sh") && select_windows_iso || continue + source "$ISO_REPO/select_windows_iso.sh" && select_windows_iso || continue ;; 3) - source <(curl -fsSL "$ISO_REPO/select_linux_iso.sh") && select_linux_iso || continue + source "$ISO_REPO/select_linux_iso.sh" && select_linux_iso || continue ;; 4) whiptail --title "OSX-PROXMOX" --yesno "$(translate "This is an external script that creates a macOS VM in Proxmox VE in just a few steps, whether you are using AMD or Intel hardware.")\n\n$(translate "The script clones the osx-proxmox.com repository and once the setup is complete, the server will automatically reboot.")\n\n$(translate "Make sure there are no critical services running as they will be interrupted. Ensure your server can be safely rebooted.")\n\n$(translate "Visit https://osx-proxmox.com for more information.")\n\n$(translate "Do you want to run the script now?")" 20 70 @@ -128,7 +128,7 @@ while true; do continue ;; 5) - source <(curl -fsSL "$ISO_REPO/select_linux_iso.sh") && select_linux_other_scripts || continue + source "$ISO_REPO/select_linux_iso.sh" && select_linux_other_scripts || continue ;; esac @@ -173,4 +173,3 @@ function start_vm_configuration() { configure_vm_advanced "$OS_TYPE" fi } - From f4185d0a2aa2826f53fe1b993f6b0c2c24f51274 Mon Sep 17 00:00:00 2001 From: cod378 Date: Mon, 3 Nov 2025 02:07:20 +0000 Subject: [PATCH 074/114] refactor: switch from remote URLs to local script execution --- scripts/vm/select_linux_iso.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/vm/select_linux_iso.sh b/scripts/vm/select_linux_iso.sh index 084f382..832b0d7 100644 --- a/scripts/vm/select_linux_iso.sh +++ b/scripts/vm/select_linux_iso.sh @@ -25,7 +25,7 @@ # ========================================================== -REPO_URL="https://raw.githubusercontent.com/MacRimi/ProxMenux/main" +LOCAL_SCRIPTS="/usr/local/share/proxmenux/scripts" BASE_DIR="/usr/local/share/proxmenux" UTILS_FILE="$BASE_DIR/utils.sh" VENV_PATH="/opt/googletrans-env" @@ -219,7 +219,7 @@ function select_linux_cloudinit() { whiptail --title "Proxmox VE Helper-Scripts" \ --msgbox "$(translate "Visit the website to discover more scripts, stay updated with the latest updates, and support the project:\n\nhttps://community-scripts.github.io/ProxmoxVE")" 15 70 - exec bash <(curl -s "$REPO_URL/scripts/vm/create_vm.sh") + exec bash "$LOCAL_SCRIPTS/vm/create_vm.sh" } From a4be1af0ef82939f7b088be931212f444e11dd43 Mon Sep 17 00:00:00 2001 From: cod378 Date: Mon, 3 Nov 2025 02:08:36 +0000 Subject: [PATCH 075/114] refactor: switch from remote URLs to local script execution --- scripts/vm/select_nas_iso.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/vm/select_nas_iso.sh b/scripts/vm/select_nas_iso.sh index 4b01986..160c4ff 100644 --- a/scripts/vm/select_nas_iso.sh +++ b/scripts/vm/select_nas_iso.sh @@ -28,7 +28,7 @@ BASE_DIR="/usr/local/share/proxmenux" UTILS_FILE="$BASE_DIR/utils.sh" VENV_PATH="/opt/googletrans-env" -REPO_URL="https://raw.githubusercontent.com/MacRimi/ProxMenux/main" +LOCAL_SCRIPTS="/usr/local/share/proxmenux/scripts" [[ -f "$UTILS_FILE" ]] && source "$UTILS_FILE" load_language @@ -62,7 +62,7 @@ function select_nas_iso() { case "$NAS_TYPE" in 1) - bash <(curl -s "$REPO_URL/scripts/vm/synology.sh") + bash "$LOCAL_SCRIPTS/vm/synology.sh" msg_success "$(translate "Press Enter to return to menu...")" read -r return 1 @@ -103,7 +103,7 @@ function select_nas_iso() { HN="Rockstor" ;; 7) - bash <(curl -s "$REPO_URL/scripts/vm/zimaos.sh") + bash "$LOCAL_SCRIPTS/vm/zimaos.sh" msg_success "$(translate "Press Enter to return to menu...")" read -r return 1 From 14e749a18dd7fca08e1e06f4a74a03fc701924f3 Mon Sep 17 00:00:00 2001 From: cod378 Date: Mon, 3 Nov 2025 02:09:56 +0000 Subject: [PATCH 076/114] refactor: switch from remote URLs to local script execution --- scripts/vm/select_windows_iso.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/vm/select_windows_iso.sh b/scripts/vm/select_windows_iso.sh index a881160..ed590af 100644 --- a/scripts/vm/select_windows_iso.sh +++ b/scripts/vm/select_windows_iso.sh @@ -24,8 +24,8 @@ # consistent and maintainable way, using ProxMenux standards. # ========================================================== -REPO_URL="https://raw.githubusercontent.com/MacRimi/ProxMenux/main" -UUP_REPO="$REPO_URL/scripts/vm" +LOCAL_SCRIPTS="/usr/local/share/proxmenux/scripts" +UUP_REPO="$LOCAL_SCRIPTS/vm" BASE_DIR="/usr/local/share/proxmenux" UTILS_FILE="$BASE_DIR/utils.sh" VENV_PATH="/opt/googletrans-env" @@ -79,7 +79,7 @@ function select_windows_iso() { case "$CHOICE" in 1) - if source <(curl -fsSL "$UUP_REPO/uupdump_creator.sh"); then + if source "$UUP_REPO/uupdump_creator.sh"; then run_uupdump_creator || return 1 detect_latest_iso_created || return 1 EXIT_FLAG="yes" From 90d10463122ef64be6d6621f021021de6da19cf6 Mon Sep 17 00:00:00 2001 From: cod378 Date: Mon, 3 Nov 2025 02:10:18 +0000 Subject: [PATCH 077/114] refactor: switch from remote URLs to local script execution (unused path) --- scripts/vm/synology_.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/vm/synology_.sh b/scripts/vm/synology_.sh index 12f955c..5b612f4 100644 --- a/scripts/vm/synology_.sh +++ b/scripts/vm/synology_.sh @@ -29,7 +29,7 @@ # Configuration ============================================ -REPO_URL="https://raw.githubusercontent.com/MacRimi/ProxMenux/main" +LOCAL_SCRIPTS="/usr/local/share/proxmenux/scripts" BASE_DIR="/usr/local/share/proxmenux" UTILS_FILE="$BASE_DIR/utils.sh" VENV_PATH="/opt/googletrans-env" From c9a01ab5ad1428e5187942e4059ffeb45c2cb3d1 Mon Sep 17 00:00:00 2001 From: cod378 Date: Mon, 3 Nov 2025 02:10:46 +0000 Subject: [PATCH 078/114] refactor: switch from remote URLs to local script execution (unused path) --- scripts/vm/synology.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/vm/synology.sh b/scripts/vm/synology.sh index d0022d1..6624033 100644 --- a/scripts/vm/synology.sh +++ b/scripts/vm/synology.sh @@ -29,7 +29,7 @@ # Configuration ============================================ -REPO_URL="https://raw.githubusercontent.com/MacRimi/ProxMenux/main" +LOCAL_SCRIPTS="/usr/local/share/proxmenux/scripts" BASE_DIR="/usr/local/share/proxmenux" UTILS_FILE="$BASE_DIR/utils.sh" VENV_PATH="/opt/googletrans-env" From 4b2ab2894a406faf556712f2e4a9e4da958ef676 Mon Sep 17 00:00:00 2001 From: cod378 Date: Mon, 3 Nov 2025 02:11:15 +0000 Subject: [PATCH 079/114] refactor: switch from remote URLs to local script execution --- scripts/vm/vm_creator.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/vm/vm_creator.sh b/scripts/vm/vm_creator.sh index a731a70..e17eb42 100644 --- a/scripts/vm/vm_creator.sh +++ b/scripts/vm/vm_creator.sh @@ -24,7 +24,7 @@ # consistent and maintainable way, using ProxMenux standards. # ========================================================== -REPO_URL="https://raw.githubusercontent.com/MacRimi/ProxMenux/main" +LOCAL_SCRIPTS="/usr/local/share/proxmenux/scripts" BASE_DIR="/usr/local/share/proxmenux" UTILS_FILE="$BASE_DIR/utils.sh" VENV_PATH="/opt/googletrans-env" @@ -494,7 +494,7 @@ fi msg_success "$(translate "Press Enter to return to the main menu...")" read -r -bash <(curl -fsSL "$REPO_URL/scripts/menus/create_vm_menu.sh") +bash "$LOCAL_SCRIPTS/menus/create_vm_menu.sh" exit 0 } From c29cdf44fb2bab08cfe0fb854a9f1be279bafed9 Mon Sep 17 00:00:00 2001 From: cod378 Date: Mon, 3 Nov 2025 02:12:25 +0000 Subject: [PATCH 080/114] refactor: switch from remote URLs to local script execution (unused path) --- scripts/vm/zimaos.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/vm/zimaos.sh b/scripts/vm/zimaos.sh index a4d55bb..480e634 100644 --- a/scripts/vm/zimaos.sh +++ b/scripts/vm/zimaos.sh @@ -22,7 +22,7 @@ # Configuration ============================================ -REPO_URL="https://raw.githubusercontent.com/MacRimi/ProxMenux/main" +LOCAL_SCRIPTS="/usr/local/share/proxmenux/scripts" BASE_DIR="/usr/local/share/proxmenux" UTILS_FILE="$BASE_DIR/utils.sh" VENV_PATH="/opt/googletrans-env" From b2e02cd0e795df2de03c2a5bed89ea6b65b6a33e Mon Sep 17 00:00:00 2001 From: cod378 Date: Mon, 3 Nov 2025 12:32:19 +0000 Subject: [PATCH 081/114] refactor: switch from remote URL to local script execution --- scripts/menus/menu_Helper_Scripts.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/menus/menu_Helper_Scripts.sh b/scripts/menus/menu_Helper_Scripts.sh index ea72758..764ebda 100644 --- a/scripts/menus/menu_Helper_Scripts.sh +++ b/scripts/menus/menu_Helper_Scripts.sh @@ -293,7 +293,7 @@ while true; do dialog --clear --title "Proxmox VE Helper-Scripts" \ --msgbox "\n\n$(translate "Visit the website to discover more scripts, stay updated with the latest updates, and support the project:")\n\nhttps://community-scripts.github.io/ProxmoxVE" 15 70 #clear - exec bash <(curl -s "$LOCAL_SCRIPTS/menus/main_menu.sh") + exec bash "$LOCAL_SCRIPTS/menus/main_menu.sh" } if [[ "$SELECTED" == "search" ]]; then From 58f9a7bc02220ec090a6a5d47260aa093e09ff36 Mon Sep 17 00:00:00 2001 From: cod378 Date: Tue, 4 Nov 2025 22:47:00 +0000 Subject: [PATCH 082/114] refactor: simplify utils.sh loading error handling --- install_proxmenux.sh | 3 --- 1 file changed, 3 deletions(-) diff --git a/install_proxmenux.sh b/install_proxmenux.sh index 4a9a37b..8966e9b 100755 --- a/install_proxmenux.sh +++ b/install_proxmenux.sh @@ -54,9 +54,6 @@ MONITOR_PORT=8008 # Load utils.sh from local repository if [[ -f "./scripts/utils.sh" ]]; then source "./scripts/utils.sh" -else - echo "Error: Could not load utils.sh from local path" - exit 1 fi cleanup_corrupted_files() { From 3ddb1421c35e90ddc75c07e78cf44a0ec1e0faa4 Mon Sep 17 00:00:00 2001 From: cod378 Date: Tue, 4 Nov 2025 22:47:52 +0000 Subject: [PATCH 083/114] feat: add offline installer script for ProxMenux - Clones ProxMenux repository to temporary location and executes installation - Includes automatic cleanup of temporary files and git dependency check - Adds colored output and error handling for better user experience --- install_proxmenux_offline.sh | 73 ++++++++++++++++++++++++++++++++++++ 1 file changed, 73 insertions(+) create mode 100644 install_proxmenux_offline.sh diff --git a/install_proxmenux_offline.sh b/install_proxmenux_offline.sh new file mode 100644 index 0000000..b0b896c --- /dev/null +++ b/install_proxmenux_offline.sh @@ -0,0 +1,73 @@ +#!/bin/bash + +# ========================================================== +# ProxMenux Offline Installer +# ========================================================== +# This script clones the ProxMenux repository to a temporary +# location, runs the installer, and then cleans up. +# ========================================================== + +set -e # Exit on error + +# Configuration +REPO_URL="https://github.com/c78-contrib/ProxMenuxOffline.git" +TEMP_DIR="/tmp/proxmenux-install-$$" +INSTALLER_SCRIPT="install_proxmenux.sh" + +# Colors for output +RED='\033[0;31m' +GREEN='\033[0;32m' +YELLOW='\033[1;33m' +NC='\033[0m' # No Color + +# Cleanup function +cleanup() { + if [ -d "$TEMP_DIR" ]; then + echo -e "${YELLOW}Cleaning up temporary files...${NC}" + rm -rf "$TEMP_DIR" + echo -e "${GREEN}Cleanup completed.${NC}" + fi +} + +# Set trap to ensure cleanup on exit +trap cleanup EXIT + +# Check if running as root +if [ "$(id -u)" -ne 0 ]; then + echo -e "${RED}Error: This script must be run as root.${NC}" + exit 1 +fi + +# Check if git is installed +if ! command -v git &> /dev/null; then + echo -e "${YELLOW}Git is not installed. Installing git...${NC}" + apt-get update -qq + apt-get install -y git +fi + +# Clone repository +echo -e "${GREEN}Cloning ProxMenux repository...${NC}" +if ! git clone --depth 1 "$REPO_URL" "$TEMP_DIR" 2>&1; then + echo -e "${RED}Error: Failed to clone repository from $REPO_URL${NC}" + exit 1 +fi + +# Change to temporary directory +cd "$TEMP_DIR" + +# Check if installer exists +if [ ! -f "$INSTALLER_SCRIPT" ]; then + echo -e "${RED}Error: Installer script '$INSTALLER_SCRIPT' not found in repository.${NC}" + exit 1 +fi + +# Make installer executable +chmod +x "$INSTALLER_SCRIPT" + +# Run the installer +echo -e "${GREEN}Running ProxMenux installer...${NC}" +echo "----------------------------------------" +bash "$INSTALLER_SCRIPT" + +echo "----------------------------------------" +echo -e "${GREEN}Installation completed successfully!${NC}" From d97be93449c627d417048862c4a25985268dc8b4 Mon Sep 17 00:00:00 2001 From: ProxMenuxBot Date: Wed, 5 Nov 2025 18:29:25 +0000 Subject: [PATCH 084/114] Update helpers_cache.json --- json/helpers_cache.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/json/helpers_cache.json b/json/helpers_cache.json index cc956c6..374ffe0 100644 --- a/json/helpers_cache.json +++ b/json/helpers_cache.json @@ -3111,8 +3111,7 @@ 21 ], "notes": [ - "Since there are hundreds of Certbot instances, it's necessary to install the specific Certbot of your preference. Running `/app/scripts/install-certbot-plugins` within the nginxproxymanager LXC shell will install many additional plugins.", - "WARNING: Installation sources scripts outside of Community Scripts repo. Please check the source before installing." + "You can install the specific one certbot you prefer, or you can Running /app/scripts/install-certbot-plugins within the Nginx Proxy Manager (NPM) LXC shell will install many common plugins. Important: This script does not install all Certbot plugins, as some require additional, external system dependencies (like specific packages for certain DNS providers). These external dependencies must be manually installed within the LXC container before you can successfully install and use the corresponding Certbot plugin. Consult the plugin's documentation for required packages." ], "type": "ct", "default_credentials": { @@ -3475,7 +3474,8 @@ 20 ], "notes": [ - "Script contains optional installation of Ollama." + "Script contains optional installation of Ollama.", + "Initial run of the application/container can take some time, depending on your host speed, as the application is installed/updated at runtime. Please be patient!" ], "type": "ct" }, From 1c1c6f513ca8feb4d0d21d21be7be963478f1ea8 Mon Sep 17 00:00:00 2001 From: ProxMenuxBot Date: Fri, 7 Nov 2025 12:40:39 +0000 Subject: [PATCH 085/114] Update helpers_cache.json --- json/helpers_cache.json | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/json/helpers_cache.json b/json/helpers_cache.json index 374ffe0..b0207e5 100644 --- a/json/helpers_cache.json +++ b/json/helpers_cache.json @@ -2028,6 +2028,18 @@ ], "type": "ct" }, + { + "name": "Infisical", + "slug": "infisical", + "desc": "Secrets, certificates, and access management on autopilot. All-in-one platform to securely manage application secrets, certificates, SSH keys, and configurations across your team and infrastructure.", + "script": "ct/infisical.sh", + "script_url": "https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/ct/infisical.sh", + "categories": [ + 6 + ], + "notes": [], + "type": "ct" + }, { "name": "InfluxDB", "slug": "influxdb", From f9fdd1686c01cfc1496aefab57140e9171c4c997 Mon Sep 17 00:00:00 2001 From: ProxMenuxBot Date: Fri, 7 Nov 2025 18:28:17 +0000 Subject: [PATCH 086/114] Update helpers_cache.json --- json/helpers_cache.json | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/json/helpers_cache.json b/json/helpers_cache.json index b0207e5..6c89e85 100644 --- a/json/helpers_cache.json +++ b/json/helpers_cache.json @@ -297,20 +297,6 @@ "notes": [], "type": "ct" }, - { - "name": "Aria2", - "slug": "aria2", - "desc": "Aria2 is a lightweight multi-protocol & multi-source, cross platform download utility operated in command-line. It supports HTTP/HTTPS, FTP, SFTP, BitTorrent and Metalink.", - "script": "ct/aria2.sh", - "script_url": "https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/ct/aria2.sh", - "categories": [ - 11 - ], - "notes": [ - "Within the LXC console, run `cat rpc.secret` to display the rpc-secret. Copy this token and paste it into the Aria2 RPC Secret Token box within the AriaNG Settings. Then, click the reload AriaNG button." - ], - "type": "ct" - }, { "name": "Asterisk", "slug": "asterisk", From 218948798250fabc5eff9a7ee7ff364cca685800 Mon Sep 17 00:00:00 2001 From: ProxMenuxBot Date: Sat, 8 Nov 2025 06:27:04 +0000 Subject: [PATCH 087/114] Update helpers_cache.json --- json/helpers_cache.json | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/json/helpers_cache.json b/json/helpers_cache.json index 6c89e85..b0207e5 100644 --- a/json/helpers_cache.json +++ b/json/helpers_cache.json @@ -297,6 +297,20 @@ "notes": [], "type": "ct" }, + { + "name": "Aria2", + "slug": "aria2", + "desc": "Aria2 is a lightweight multi-protocol & multi-source, cross platform download utility operated in command-line. It supports HTTP/HTTPS, FTP, SFTP, BitTorrent and Metalink.", + "script": "ct/aria2.sh", + "script_url": "https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/ct/aria2.sh", + "categories": [ + 11 + ], + "notes": [ + "Within the LXC console, run `cat rpc.secret` to display the rpc-secret. Copy this token and paste it into the Aria2 RPC Secret Token box within the AriaNG Settings. Then, click the reload AriaNG button." + ], + "type": "ct" + }, { "name": "Asterisk", "slug": "asterisk", From 07ca3f13a0b0bfca3613f87ff24b2397ab5f41cc Mon Sep 17 00:00:00 2001 From: ProxMenuxBot Date: Mon, 10 Nov 2025 12:41:30 +0000 Subject: [PATCH 088/114] Update helpers_cache.json --- json/helpers_cache.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/json/helpers_cache.json b/json/helpers_cache.json index b0207e5..d02c1c4 100644 --- a/json/helpers_cache.json +++ b/json/helpers_cache.json @@ -739,7 +739,8 @@ 10 ], "notes": [ - "Set a root password if using autologin. This will be the Cockpit password.`sudo passwd root`" + "Set a root password if using autologin. This will be the Cockpit password. To set root password run `sudo passwd root`", + "If you plan on using 45Drives extension with NFS, you must setup LXC as privileged. Some features of 45Drives don't work on Debian 13, so Debian 12 must be used." ], "type": "ct" }, From a507d559e164e1e2634880a90ab92b6f6e29a128 Mon Sep 17 00:00:00 2001 From: ProxMenuxBot Date: Tue, 11 Nov 2025 01:29:31 +0000 Subject: [PATCH 089/114] Update helpers_cache.json --- json/helpers_cache.json | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/json/helpers_cache.json b/json/helpers_cache.json index d02c1c4..76a06b8 100644 --- a/json/helpers_cache.json +++ b/json/helpers_cache.json @@ -3873,18 +3873,6 @@ ], "type": "addon" }, - { - "name": "Pi.Alert", - "slug": "pialert", - "desc": "Pi.Alert is a WIFI / LAN intruder detector. Checks the devices connected and alert you with unknown devices. It also warns of the disconnection of \"always connected\" devices.", - "script": "ct/pialert.sh", - "script_url": "https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/ct/pialert.sh", - "categories": [ - 4 - ], - "notes": [], - "type": "ct" - }, { "name": "Pi-Hole", "slug": "pihole", From 401d973a51e6cb937cc5adb25d5be4ef783af1dc Mon Sep 17 00:00:00 2001 From: ProxMenuxBot Date: Tue, 11 Nov 2025 06:31:46 +0000 Subject: [PATCH 090/114] Update helpers_cache.json --- json/helpers_cache.json | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/json/helpers_cache.json b/json/helpers_cache.json index 76a06b8..d02c1c4 100644 --- a/json/helpers_cache.json +++ b/json/helpers_cache.json @@ -3873,6 +3873,18 @@ ], "type": "addon" }, + { + "name": "Pi.Alert", + "slug": "pialert", + "desc": "Pi.Alert is a WIFI / LAN intruder detector. Checks the devices connected and alert you with unknown devices. It also warns of the disconnection of \"always connected\" devices.", + "script": "ct/pialert.sh", + "script_url": "https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/ct/pialert.sh", + "categories": [ + 4 + ], + "notes": [], + "type": "ct" + }, { "name": "Pi-Hole", "slug": "pihole", From 03b9ac3ec4743d93437f0c727d2633dd940a1857 Mon Sep 17 00:00:00 2001 From: ProxMenuxBot Date: Tue, 11 Nov 2025 12:40:51 +0000 Subject: [PATCH 091/114] Update helpers_cache.json --- json/helpers_cache.json | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/json/helpers_cache.json b/json/helpers_cache.json index d02c1c4..866edd8 100644 --- a/json/helpers_cache.json +++ b/json/helpers_cache.json @@ -953,18 +953,6 @@ "notes": [], "type": "ct" }, - { - "name": "Dashy", - "slug": "dashy", - "desc": "Dashy is a solution that helps you organize your self-hosted services by centralizing access to them through a single interface.", - "script": "ct/dashy.sh", - "script_url": "https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/ct/dashy.sh", - "categories": [ - 10 - ], - "notes": [], - "type": "ct" - }, { "name": "Debian 13", "slug": "debian-13-vm", From 4ec7c207f43d5dccaaa125050e81e3dd2dc69fd0 Mon Sep 17 00:00:00 2001 From: ProxMenuxBot Date: Wed, 12 Nov 2025 01:29:08 +0000 Subject: [PATCH 092/114] Update helpers_cache.json --- json/helpers_cache.json | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/json/helpers_cache.json b/json/helpers_cache.json index 866edd8..1253c95 100644 --- a/json/helpers_cache.json +++ b/json/helpers_cache.json @@ -1131,6 +1131,18 @@ ], "type": "ct" }, + { + "name": "Domain Monitor", + "slug": "domain-monitor", + "desc": "A self-hosted PHP domain expiration monitoring tool that tracks domain expiry dates, RDAP/WHOIS data, and SSL certificate validity. Supports alerts, multi-user setup, and cron automation. Built for developers, hosting providers, and IT admins who want full control without third-party services.", + "script": "ct/domain-monitor.sh", + "script_url": "https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/ct/domain-monitor.sh", + "categories": [ + 9 + ], + "notes": [], + "type": "ct" + }, { "name": "Donetick", "slug": "donetick", From ce3c7a545e948c0ba8f7e5c88c886e575966a10a Mon Sep 17 00:00:00 2001 From: cod378 Date: Wed, 12 Nov 2025 04:04:10 +0000 Subject: [PATCH 093/114] feat: add GitHub authentication script to gitignore --- .gitignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitignore b/.gitignore index 045762a..19fae05 100644 --- a/.gitignore +++ b/.gitignore @@ -51,3 +51,5 @@ Thumbs.db !guides/ !web/ +# GitHub authentication +.github/auth.sh From 43526c58bd9e06f4e1a6ce3ab0ef668576fc41d1 Mon Sep 17 00:00:00 2001 From: cod378 Date: Wed, 12 Nov 2025 04:11:41 +0000 Subject: [PATCH 094/114] refactor: reorganize installer to use git-based offline installation - Changed from local script loading to cloning repository into temporary directory - Added cleanup function with trap to ensure temporary files are removed on exit - Added git as a required dependency for the installation process --- install_proxmenux.sh | 54 ++++++++++++++++++++++++++++++++++++-------- 1 file changed, 45 insertions(+), 9 deletions(-) diff --git a/install_proxmenux.sh b/install_proxmenux.sh index 8966e9b..64f8b1b 100755 --- a/install_proxmenux.sh +++ b/install_proxmenux.sh @@ -35,7 +35,6 @@ # Configuration ============================================ LOCAL_SCRIPTS="/usr/local/share/proxmenux/scripts" -# UTILS_URL - No longer used in local version (now loaded from ./scripts/utils.sh) INSTALL_DIR="/usr/local/bin" BASE_DIR="/usr/local/share/proxmenux" CONFIG_FILE="$BASE_DIR/config.json" @@ -51,10 +50,9 @@ MONITOR_INSTALL_PATH="$BASE_DIR/ProxMenux-Monitor.AppImage" MONITOR_SERVICE_FILE="/etc/systemd/system/proxmenux-monitor.service" MONITOR_PORT=8008 -# Load utils.sh from local repository -if [[ -f "./scripts/utils.sh" ]]; then - source "./scripts/utils.sh" -fi +# Offline installer envs +REPO_URL="https://github.com/c78-contrib/ProxMenuxOffline.git" +TEMP_DIR="/tmp/proxmenux-install-$$" cleanup_corrupted_files() { if [ -f "$CONFIG_FILE" ] && ! jq empty "$CONFIG_FILE" >/dev/null 2>&1; then @@ -67,6 +65,19 @@ cleanup_corrupted_files() { fi } +# Cleanup function +cleanup() { + if [ -d "$TEMP_DIR" ]; then + echo -e "${YELLOW}Cleaning up temporary files...${NC}" + rm -rf "$TEMP_DIR" + echo -e "${GREEN}Cleanup completed.${NC}" + fi +} + +# Set trap to ensure cleanup on exit +trap cleanup EXIT + + # ========================================================== check_existing_installation() { local has_venv=false @@ -406,7 +417,7 @@ EOF #################################################### install_normal_version() { - local total_steps=4 + local total_steps=5 local current_step=1 show_progress $current_step $total_steps "Installing basic dependencies." @@ -438,7 +449,7 @@ install_normal_version() { update_config "jq" "already_installed" fi - BASIC_DEPS=("dialog" "curl") + BASIC_DEPS=("dialog" "curl" "git") for pkg in "${BASIC_DEPS[@]}"; do if ! dpkg -l | grep -qw "$pkg"; then if apt-get install -y "$pkg" > /dev/null 2>&1; then @@ -453,8 +464,33 @@ install_normal_version() { fi done - msg_ok "jq, dialog and curl installed successfully." - + msg_ok "jq, dialog, curl and git installed successfully." + + # -------------------------------------------------------------------------------------- + # Clone repository + ((current_step++)) + + show_progress $current_step $total_steps "Cloning ProxMenux repository..." + if ! git clone --depth 1 "$REPO_URL" "$TEMP_DIR" 2>&1; then + msg_error "Failed to clone repository from $REPO_URL" + exit 1 + fi + + msg_ok "Repository cloned successfully." + + # Change to temporary directory + cd "$TEMP_DIR" + + # Load utils.sh from local repository + if [[ -f "./scripts/utils.sh" ]]; then + source "./scripts/utils.sh" + else + msg_error "Failed to load utils.sh from local repository. Please report this issue." + exit 1 + fi + + # -------------------------------------------------------------------------------------- + ((current_step++)) show_progress $current_step $total_steps "Creating directories and configuration" From f0bcdc1c2543ac7c21be92e4f6f375e902b21a8a Mon Sep 17 00:00:00 2001 From: cod378 Date: Wed, 12 Nov 2025 04:22:11 +0000 Subject: [PATCH 095/114] refactor: move utils.sh loading to script initialization because this is an installer dependency --- install_proxmenux.sh | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/install_proxmenux.sh b/install_proxmenux.sh index 64f8b1b..ab2b2b2 100755 --- a/install_proxmenux.sh +++ b/install_proxmenux.sh @@ -40,6 +40,7 @@ BASE_DIR="/usr/local/share/proxmenux" CONFIG_FILE="$BASE_DIR/config.json" CACHE_FILE="$BASE_DIR/cache.json" UTILS_FILE="$BASE_DIR/utils.sh" +UTILS_URL="https://github.com/MacRimi/ProxMenux/raw/refs/heads/main/scripts/utils.sh" LOCAL_VERSION_FILE="$BASE_DIR/version.txt" MENU_SCRIPT="menu" VENV_PATH="/opt/googletrans-env" @@ -54,6 +55,15 @@ MONITOR_PORT=8008 REPO_URL="https://github.com/c78-contrib/ProxMenuxOffline.git" TEMP_DIR="/tmp/proxmenux-install-$$" +# Load utils.sh from local repository +if [[ -f "$UTILS_URL" ]]; then + source "$UTILS_URL" +else + msg_error "Failed to load utils dependencies. Please report this issue." + exit 1 +fi + + cleanup_corrupted_files() { if [ -f "$CONFIG_FILE" ] && ! jq empty "$CONFIG_FILE" >/dev/null 2>&1; then echo "Cleaning up corrupted configuration file..." @@ -481,14 +491,6 @@ install_normal_version() { # Change to temporary directory cd "$TEMP_DIR" - # Load utils.sh from local repository - if [[ -f "./scripts/utils.sh" ]]; then - source "./scripts/utils.sh" - else - msg_error "Failed to load utils.sh from local repository. Please report this issue." - exit 1 - fi - # -------------------------------------------------------------------------------------- ((current_step++)) From bf71e1f9b834682fa04549819b26b781ce394b3e Mon Sep 17 00:00:00 2001 From: cod378 Date: Wed, 12 Nov 2025 04:23:43 +0000 Subject: [PATCH 096/114] refactor: update comment for utils.sh loading --- install_proxmenux.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install_proxmenux.sh b/install_proxmenux.sh index ab2b2b2..7b72c08 100755 --- a/install_proxmenux.sh +++ b/install_proxmenux.sh @@ -55,7 +55,7 @@ MONITOR_PORT=8008 REPO_URL="https://github.com/c78-contrib/ProxMenuxOffline.git" TEMP_DIR="/tmp/proxmenux-install-$$" -# Load utils.sh from local repository +# Load utils.sh dependency if [[ -f "$UTILS_URL" ]]; then source "$UTILS_URL" else From acff4523f3565fd37f5bd17298b987667f7e6b0a Mon Sep 17 00:00:00 2001 From: cod378 Date: Wed, 12 Nov 2025 04:29:40 +0000 Subject: [PATCH 097/114] refactor: simplify utils.sh loading with inline sourcing - Replaced conditional file check with direct curl sourcing using process substitution - Streamlined error handling to single-line check --- install_proxmenux.sh | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/install_proxmenux.sh b/install_proxmenux.sh index 7b72c08..a0e605e 100755 --- a/install_proxmenux.sh +++ b/install_proxmenux.sh @@ -56,10 +56,8 @@ REPO_URL="https://github.com/c78-contrib/ProxMenuxOffline.git" TEMP_DIR="/tmp/proxmenux-install-$$" # Load utils.sh dependency -if [[ -f "$UTILS_URL" ]]; then - source "$UTILS_URL" -else - msg_error "Failed to load utils dependencies. Please report this issue." +if ! source <(curl -sSf "$UTILS_URL"); then + echo "Error: Could not load utils.sh from $UTILS_URL" exit 1 fi From 85294bcd33cb9c6e575ccef1f3c7e2e6d6e17c9e Mon Sep 17 00:00:00 2001 From: cod378 Date: Wed, 12 Nov 2025 04:40:10 +0000 Subject: [PATCH 098/114] fix: correct utils.sh download URL format --- install_proxmenux.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install_proxmenux.sh b/install_proxmenux.sh index a0e605e..32fd7be 100755 --- a/install_proxmenux.sh +++ b/install_proxmenux.sh @@ -40,7 +40,7 @@ BASE_DIR="/usr/local/share/proxmenux" CONFIG_FILE="$BASE_DIR/config.json" CACHE_FILE="$BASE_DIR/cache.json" UTILS_FILE="$BASE_DIR/utils.sh" -UTILS_URL="https://github.com/MacRimi/ProxMenux/raw/refs/heads/main/scripts/utils.sh" +UTILS_URL="https://raw.githubusercontent.com/MacRimi/ProxMenux/main/scripts/utils.sh" LOCAL_VERSION_FILE="$BASE_DIR/version.txt" MENU_SCRIPT="menu" VENV_PATH="/opt/googletrans-env" From 3ddf98277fbd245f672436efc6fc4674693f6f80 Mon Sep 17 00:00:00 2001 From: cod378 Date: Wed, 12 Nov 2025 04:48:29 +0000 Subject: [PATCH 099/114] refactor: update utils script source URL to offline repository --- install_proxmenux.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install_proxmenux.sh b/install_proxmenux.sh index 32fd7be..03a3736 100755 --- a/install_proxmenux.sh +++ b/install_proxmenux.sh @@ -40,7 +40,7 @@ BASE_DIR="/usr/local/share/proxmenux" CONFIG_FILE="$BASE_DIR/config.json" CACHE_FILE="$BASE_DIR/cache.json" UTILS_FILE="$BASE_DIR/utils.sh" -UTILS_URL="https://raw.githubusercontent.com/MacRimi/ProxMenux/main/scripts/utils.sh" +UTILS_URL="https://raw.githubusercontent.com/c78-contrib/ProxMenuxOffline/refs/heads/main/scripts/utils.sh" LOCAL_VERSION_FILE="$BASE_DIR/version.txt" MENU_SCRIPT="menu" VENV_PATH="/opt/googletrans-env" From e0eaf6267f40492d5168ea37c77578f37289dd83 Mon Sep 17 00:00:00 2001 From: cod378 Date: Wed, 12 Nov 2025 04:53:37 +0000 Subject: [PATCH 100/114] fix: suppress git clone output to reduce installation noise --- install_proxmenux.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install_proxmenux.sh b/install_proxmenux.sh index 03a3736..8c1e27f 100755 --- a/install_proxmenux.sh +++ b/install_proxmenux.sh @@ -479,7 +479,7 @@ install_normal_version() { ((current_step++)) show_progress $current_step $total_steps "Cloning ProxMenux repository..." - if ! git clone --depth 1 "$REPO_URL" "$TEMP_DIR" 2>&1; then + if ! git clone --depth 1 "$REPO_URL" "$TEMP_DIR" 2>/dev/null; then msg_error "Failed to clone repository from $REPO_URL" exit 1 fi From 0a20821c41057c440f53e422abbfeba5e8a6a4dd Mon Sep 17 00:00:00 2001 From: cod378 Date: Wed, 12 Nov 2025 05:00:06 +0000 Subject: [PATCH 101/114] refactor: remove verbose cleanup messages from temporary file removal --- install_proxmenux.sh | 2 -- 1 file changed, 2 deletions(-) diff --git a/install_proxmenux.sh b/install_proxmenux.sh index 8c1e27f..d6b3218 100755 --- a/install_proxmenux.sh +++ b/install_proxmenux.sh @@ -76,9 +76,7 @@ cleanup_corrupted_files() { # Cleanup function cleanup() { if [ -d "$TEMP_DIR" ]; then - echo -e "${YELLOW}Cleaning up temporary files...${NC}" rm -rf "$TEMP_DIR" - echo -e "${GREEN}Cleanup completed.${NC}" fi } From 048cf2fb8f7c2ac1e63bf82dffa638ed6c47d88c Mon Sep 17 00:00:00 2001 From: cod378 Date: Wed, 12 Nov 2025 05:21:33 +0000 Subject: [PATCH 102/114] docs: update project name references from ProxMenuxDotDeb to ProxMenuxOffline --- docs/01.PROXMENUX_REVIEW.md | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/docs/01.PROXMENUX_REVIEW.md b/docs/01.PROXMENUX_REVIEW.md index 985b474..467ce5b 100644 --- a/docs/01.PROXMENUX_REVIEW.md +++ b/docs/01.PROXMENUX_REVIEW.md @@ -6,13 +6,13 @@ ## **1. Estructura General del Proyecto** ### **Archivos Principales** -- **[install_proxmenux.sh](cci:7://file:///home/debian/src/ProxMenuxDotDeb/install_proxmenux.sh:0:0-0:0)**: Script de instalación principal (723 líneas) -- **[menu](cci:7://file:///home/debian/src/ProxMenuxDotDeb/menu:0:0-0:0)**: Script principal que se instala como comando del sistema (93 líneas) -- **[version.txt](cci:7://file:///home/debian/src/ProxMenuxDotDeb/version.txt:0:0-0:0)**: Control de versiones (actual: 1.1.7) +- **[install_proxmenux.sh](cci:7://file:///home/debian/src/ProxMenuxOffline/install_proxmenux.sh:0:0-0:0)**: Script de instalación principal (723 líneas) +- **[menu](cci:7://file:///home/debian/src/ProxMenuxOffline/menu:0:0-0:0)**: Script principal que se instala como comando del sistema (93 líneas) +- **[version.txt](cci:7://file:///home/debian/src/ProxMenuxOffline/version.txt:0:0-0:0)**: Control de versiones (actual: 1.1.7) ### **Directorios Principales** ``` -ProxMenuxDotDeb/ +ProxMenuxOffline/ ├── scripts/ # 122 archivos de scripts bash │ ├── menus/ # 13 scripts de menús │ ├── lxc/ # 6 scripts para contenedores LXC @@ -36,15 +36,15 @@ ProxMenuxDotDeb/ ## **2. Flujo de Instalación** -### **Script: [install_proxmenux.sh](cci:7://file:///home/debian/src/ProxMenuxDotDeb/install_proxmenux.sh:0:0-0:0)** +### **Script: [install_proxmenux.sh](cci:7://file:///home/debian/src/ProxMenuxOffline/install_proxmenux.sh:0:0-0:0)** **Fase 1: Inicialización** - Verifica permisos root (línea 716-719) -- Carga [utils.sh](cci:7://file:///home/debian/src/ProxMenuxDotDeb/scripts/utils.sh:0:0-0:0) desde GitHub (línea 54-57) +- Carga [utils.sh](cci:7://file:///home/debian/src/ProxMenuxOffline/scripts/utils.sh:0:0-0:0) desde GitHub (línea 54-57) - Limpia archivos corruptos de configuración (línea 59-68) **Fase 2: Detección de Instalación Existente** -- Función [check_existing_installation()](cci:1://file:///home/debian/src/ProxMenuxDotDeb/install_proxmenux.sh:70:0-106:1) (línea 71-107) +- Función [check_existing_installation()](cci:1://file:///home/debian/src/ProxMenuxOffline/install_proxmenux.sh:70:0-106:1) (línea 71-107) - Detecta 4 tipos: `none`, `normal`, `translation`, `unknown` - Verifica entorno virtual Python en `/opt/googletrans-env` - Verifica configuración de idioma en `/usr/local/share/proxmenux/config.json` @@ -61,7 +61,7 @@ ProxMenuxDotDeb/ - Soporte multiidioma: en, es, fr, de, it, pt - **Nota**: No compatible con Proxmox VE 9+ (línea 639-658) -**Fase 4: Instalación Normal** ([install_normal_version()](cci:1://file:///home/debian/src/ProxMenuxDotDeb/install_proxmenux.sh:402:0-484:1)) +**Fase 4: Instalación Normal** ([install_normal_version()](cci:1://file:///home/debian/src/ProxMenuxOffline/install_proxmenux.sh:402:0-484:1)) 1. Instala dependencias básicas 2. Crea directorios: - `/usr/local/bin` (ejecutables) @@ -502,7 +502,7 @@ Archivos de idioma estáticos (4-5 KB cada uno) ## **Conclusión** -ProxMenuxDotDeb es un **sistema modular de gestión de Proxmox VE** que utiliza una arquitectura híbrida: +ProxMenuxOffline es un **sistema modular de gestión de Proxmox VE** que utiliza una arquitectura híbrida: - **Núcleo local**: Comando `menu`, utilidades, sistema de configuración - **Scripts remotos**: Toda la funcionalidad se descarga dinámicamente desde GitHub From 39ddb7c8f960c09638813ebaa47630578ea76a0f Mon Sep 17 00:00:00 2001 From: ProxMenuxBot Date: Wed, 12 Nov 2025 12:41:44 +0000 Subject: [PATCH 103/114] Update helpers_cache.json --- json/helpers_cache.json | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/json/helpers_cache.json b/json/helpers_cache.json index 1253c95..81a055e 100644 --- a/json/helpers_cache.json +++ b/json/helpers_cache.json @@ -2575,7 +2575,7 @@ 20 ], "notes": [ - "Show initial Livebook password: `cat ~/livebook.creds`" + "Show initial Livebook password: `cat /opt/livebook/livebook.creds`" ], "type": "ct" }, @@ -5570,7 +5570,9 @@ "categories": [ 4 ], - "notes": [], + "notes": [ + "This script uses a fork located here: `https://github.com/CrazyWolf13/web-check/` as the original Repository does not provide tagged Github Releases, an issues is open for this: `https://github.com/Lissy93/web-check/issues/248`" + ], "type": "ct" }, { From 16fc737b2d80a3fc153f5dde8c2476e097e5d090 Mon Sep 17 00:00:00 2001 From: ProxMenuxBot Date: Wed, 12 Nov 2025 18:29:07 +0000 Subject: [PATCH 104/114] Update helpers_cache.json --- json/helpers_cache.json | 46 ++++++++++++++++++++++++++++++----------- 1 file changed, 34 insertions(+), 12 deletions(-) diff --git a/json/helpers_cache.json b/json/helpers_cache.json index 81a055e..97aa34c 100644 --- a/json/helpers_cache.json +++ b/json/helpers_cache.json @@ -1297,18 +1297,6 @@ ], "type": "pve" }, - { - "name": "Fenrus", - "slug": "fenrus", - "desc": "A personal home page for quick access to all your personal apps/sites.", - "script": "ct/fenrus.sh", - "script_url": "https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/ct/fenrus.sh", - "categories": [ - 10 - ], - "notes": [], - "type": "ct" - }, { "name": "FHEM", "slug": "fhem", @@ -2860,6 +2848,24 @@ "password": "admin123" } }, + { + "name": "Miniflux", + "slug": "miniflux", + "desc": "Miniflux is a minimalist and opinionated feed reader.", + "script": "ct/miniflux.sh", + "script_url": "https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/ct/miniflux.sh", + "categories": [ + 13 + ], + "notes": [ + "Admin password available as `ADMIN_PASSWORD` in `~/miniflux.creds`" + ], + "type": "ct", + "default_credentials": { + "username": "admin", + "password": "randomly generated during installation process" + } + }, { "name": "MinIO", "slug": "minio", @@ -4771,6 +4777,22 @@ "notes": [], "type": "ct" }, + { + "name": "Splunk Enterprise", + "slug": "splunk-enterprise", + "desc": "Platform for searching, monitoring, and analyzing machine-generated data at scale for operational intelligence and security.", + "script": "ct/splunk-enterprise.sh", + "script_url": "https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/ct/splunk-enterprise.sh", + "categories": [ + 9 + ], + "notes": [ + "The credentials to login can be found in splunk.creds.", + "Trial license allows indexing 500 MB/Day. After 60 days you can convert to a perpetual free license or purchase a Splunk Enterprise license to continue using the expanded functionality designed for enterprise-scale deployments.", + "About Splunk Free License: https://help.splunk.com/en/splunk-enterprise/administer/admin-manual/10.0/configure-splunk-licenses/about-splunk-free" + ], + "type": "ct" + }, { "name": "Spoolman", "slug": "spoolman", From 9f3286c570d4236f92a38c5b29e6e6879d413231 Mon Sep 17 00:00:00 2001 From: cod378 Date: Thu, 13 Nov 2025 02:50:41 +0000 Subject: [PATCH 105/114] feat: migrate to offline installer with enhanced monitor deployment - Restructured installer to use local repository files instead of remote downloads for improved reliability - Added comprehensive logging functions (spinner, type_text, msg_* helpers) and dual logo support for SSH/noVNC terminals - Implemented AppImage version detection, SHA256 verification, and systemd service management for ProxMenux Monitor - Updated metadata to reflect toolkit positioning and added contributor attribution --- install_proxmenux.sh | 456 ++++++++++++++++++++++++++++++++++--------- 1 file changed, 365 insertions(+), 91 deletions(-) diff --git a/install_proxmenux.sh b/install_proxmenux.sh index d6b3218..8bf36bc 100755 --- a/install_proxmenux.sh +++ b/install_proxmenux.sh @@ -1,36 +1,42 @@ #!/bin/bash # ========================================================== -# ProxMenux - A menu-driven script for Proxmox VE management +# ProxMenux - A menu-driven toolkit for Proxmox VE management # ========================================================== -# Author : MacRimi -# Copyright : (c) 2024 MacRimi -# License : (CC BY-NC 4.0) (https://github.com/MacRimi/ProxMenux/blob/main/LICENSE) -# Version : 1.3 -# Last Updated: 04/07/2025 +# Author : MacRimi +# Contributors : cod378 +# Subproject : ProxMenux Monitor (System Health & Web Dashboard) +# Copyright : (c) 2024-2025 MacRimi +# License : (CC BY-NC 4.0) (https://github.com/MacRimi/ProxMenux/blob/main/LICENSE) +# Version : 1.4 +# Last Updated : 12/11/2025 # ========================================================== # Description: # This script installs and configures ProxMenux, a menu-driven -# tool for managing Proxmox VE. +# toolkit for managing and optimizing Proxmox VE servers. # # - Ensures the script is run with root privileges. # - Displays an installation confirmation prompt. # - Installs required dependencies: -# - whiptail (for interactive terminal menus) -# - curl (for downloading remote files) -# - jq (for handling JSON data) -# - Python 3 and virtual environment (for translations) -# - Configures the Python virtual environment and installs googletrans. -# - Creates necessary directories for storing ProxMenux data. -# - Downloads required files from GitHub, including: -# - Cache file (`cache.json`) for translation caching. -# - Utility script (`utils.sh`) for core functions. -# - Main script (`menu.sh`) to launch ProxMenux. -# - Sets correct permissions for execution. -# - Displays final instructions on how to start ProxMenux. +# • whiptail (interactive terminal menus) +# • curl (downloads and connectivity checks) +# • jq (JSON parsing) +# • Python 3 + venv (for translation support) +# - Creates the ProxMenux base directories and configuration files: +# • $BASE_DIR/config.json +# • $BASE_DIR/cache.json +# - Copies local project files into the target paths (offline mode by default): +# • scripts/* → $BASE_DIR/scripts/ +# • utils.sh → $BASE_DIR/scripts/utils.sh +# • menu → $INSTALL_DIR/menu (main launcher) +# • install_proxmenux.sh → $BASE_DIR/install_proxmenux.sh +# - Sets correct permissions for all executables. +# - Displays the final instruction on how to start ProxMenux ("menu"). # -# This installer ensures a smooth setup process and prepares -# the system for running ProxMenux efficiently. +# Notes: +# - This installer supports both offline and online setups. +# - ProxMenux Monitor can be installed later as an optional module +# to provide real-time system monitoring and a web dashboard. # ========================================================== # Configuration ============================================ @@ -40,27 +46,225 @@ BASE_DIR="/usr/local/share/proxmenux" CONFIG_FILE="$BASE_DIR/config.json" CACHE_FILE="$BASE_DIR/cache.json" UTILS_FILE="$BASE_DIR/utils.sh" -UTILS_URL="https://raw.githubusercontent.com/c78-contrib/ProxMenuxOffline/refs/heads/main/scripts/utils.sh" LOCAL_VERSION_FILE="$BASE_DIR/version.txt" MENU_SCRIPT="menu" VENV_PATH="/opt/googletrans-env" -MONITOR_APPIMAGE_URL="https://github.com/MacRimi/ProxMenux/raw/refs/heads/main/AppImage/ProxMenux-1.0.0.AppImage" -MONITOR_SHA256_URL="https://github.com/MacRimi/ProxMenux/raw/refs/heads/main/AppImage/ProxMenux-Monitor.AppImage.sha256" -MONITOR_INSTALL_PATH="$BASE_DIR/ProxMenux-Monitor.AppImage" +MONITOR_INSTALL_DIR="$BASE_DIR/monitor" MONITOR_SERVICE_FILE="/etc/systemd/system/proxmenux-monitor.service" MONITOR_PORT=8008 # Offline installer envs -REPO_URL="https://github.com/c78-contrib/ProxMenuxOffline.git" +REPO_URL="https://github.com/MacRimi/ProxMenux.git" TEMP_DIR="/tmp/proxmenux-install-$$" -# Load utils.sh dependency -if ! source <(curl -sSf "$UTILS_URL"); then - echo "Error: Could not load utils.sh from $UTILS_URL" - exit 1 +# Load utility functions +NEON_PURPLE_BLUE="\033[38;5;99m" +WHITE="\033[38;5;15m" +RESET="\033[0m" +DARK_GRAY="\033[38;5;244m" +ORANGE="\033[38;5;208m" +YW="\033[33m" +YWB="\033[1;33m" +GN="\033[1;92m" +RD="\033[01;31m" +CL="\033[m" +BL="\033[36m" +DGN="\e[32m" +BGN="\e[1;32m" +DEF="\e[1;36m" +CUS="\e[38;5;214m" +BOLD="\033[1m" +BFR="\\r\\033[K" +HOLD="-" +BOR=" | " +CM="${GN}✓ ${CL}" +TAB=" " + + +# Create and display spinner +spinner() { + local frames=('⠋' '⠙' '⠹' '⠸' '⠼' '⠴' '⠦' '⠧' '⠇' '⠏') + local spin_i=0 + local interval=0.1 + printf "\e[?25l" + + local color="${YW}" + + while true; do + printf "\r ${color}%s${CL}" "${frames[spin_i]}" + spin_i=$(( (spin_i + 1) % ${#frames[@]} )) + sleep "$interval" + done +} + + +# Function to simulate typing effect +type_text() { + local text="$1" + local delay=0.05 + for ((i=0; i<${#text}; i++)); do + echo -n "${text:$i:1}" + sleep $delay + done + echo +} + + +# Display info message with spinner +msg_info() { + local msg="$1" + echo -ne "${TAB}${YW}${HOLD}${msg}" + spinner & + SPINNER_PID=$! +} + + +# Display info2 message +msg_info2() { + local msg="$1" + echo -e "${TAB}${BOLD}${YW}${HOLD}${msg}${CL}" +} + + + +# Display title script +msg_title() { + local msg="$1" + echo -e "\n" + echo -e "${TAB}${BOLD}${HOLD}${BOR}${msg}${BOR}${HOLD}${CL}" + echo -e "\n" +} + + +# Display warning or highlighted information message +msg_warn() { + if [ -n "$SPINNER_PID" ] && ps -p $SPINNER_PID > /dev/null; then + kill $SPINNER_PID > /dev/null + fi + printf "\e[?25h" + local msg="$1" + echo -e "${BFR}${TAB}${CL} ${YWB}${msg}${CL}" +} + + +# Display success message +msg_ok() { + if [ -n "$SPINNER_PID" ] && ps -p $SPINNER_PID > /dev/null; then + kill $SPINNER_PID > /dev/null + fi + printf "\e[?25h" + local msg="$1" + echo -e "${BFR}${TAB}${CM}${GN}${msg}${CL}" +} + + +# Display error message +msg_error() { + if [ -n "$SPINNER_PID" ] && ps -p $SPINNER_PID > /dev/null; then + kill $SPINNER_PID > /dev/null + fi + printf "\e[?25h" + local msg="$1" + echo -e "${BFR}${TAB}${RD}[ERROR] ${msg}${CL}" +} + + + + +show_proxmenux_logo() { +clear + +if [[ -z "$SSH_TTY" && -z "$(who am i | awk '{print $NF}' | grep -E '([0-9]{1,3}\.){3}[0-9]{1,3}')" ]]; then + +# Logo for terminal noVNC + +LOGO=$(cat << "EOF" +\e[0m\e[38;2;61;61;61m▆\e[38;2;60;60;60m▄\e[38;2;54;54;54m▂\e[0m \e[38;2;0;0;0m \e[0m \e[38;2;54;54;54m▂\e[38;2;60;60;60m▄\e[38;2;61;61;61m▆\e[0m +\e[38;2;59;59;59;48;2;62;62;62m▏ \e[38;2;61;61;61;48;2;37;37;37m▇\e[0m\e[38;2;60;60;60m▅\e[38;2;56;56;56m▃\e[38;2;37;37;37m▁ \e[38;2;36;36;36m▁\e[38;2;56;56;56m▃\e[38;2;60;60;60m▅\e[38;2;61;61;61;48;2;37;37;37m▇\e[48;2;62;62;62m \e[0m\e[7m\e[38;2;60;60;60m▁\e[0m +\e[38;2;59;59;59;48;2;62;62;62m▏ \e[0m\e[7m\e[38;2;61;61;61m▂\e[0m\e[38;2;62;62;62;48;2;61;61;61m┈\e[48;2;62;62;62m \e[48;2;61;61;61m┈\e[0m\e[38;2;60;60;60m▆\e[38;2;57;57;57m▄\e[38;2;48;48;48m▂\e[0m \e[38;2;47;47;47m▂\e[38;2;57;57;57m▄\e[38;2;60;60;60m▆\e[38;2;62;62;62;48;2;61;61;61m┈\e[48;2;62;62;62m \e[48;2;61;61;61m┈\e[0m\e[7m\e[38;2;60;60;60m▂\e[38;2;57;57;57m▄\e[38;2;47;47;47m▆\e[0m \e[0m +\e[38;2;59;59;59;48;2;62;62;62m▏ \e[0m\e[38;2;32;32;32m▏\e[7m\e[38;2;39;39;39m▇\e[38;2;57;57;57m▅\e[38;2;60;60;60m▃\e[0m\e[38;2;40;40;40;48;2;61;61;61m▁\e[48;2;62;62;62m \e[38;2;54;54;54;48;2;61;61;61m┊\e[48;2;62;62;62m \e[38;2;39;39;39;48;2;61;61;61m▁\e[0m\e[7m\e[38;2;60;60;60m▃\e[38;2;57;57;57m▅\e[38;2;38;38;38m▇\e[0m \e[38;2;193;60;2m▃\e[38;2;217;67;2m▅\e[38;2;225;70;2m▇\e[0m +\e[38;2;59;59;59;48;2;62;62;62m▏ \e[0m\e[38;2;32;32;32m▏\e[0m \e[38;2;203;63;2m▄\e[38;2;147;45;1m▂\e[0m \e[7m\e[38;2;55;55;55m▆\e[38;2;60;60;60m▄\e[38;2;61;61;61m▂\e[38;2;60;60;60m▄\e[38;2;55;55;55m▆\e[0m \e[38;2;144;44;1m▂\e[38;2;202;62;2m▄\e[38;2;219;68;2m▆\e[38;2;231;72;3;48;2;226;70;2m┈\e[48;2;231;72;3m \e[48;2;225;70;2m▉\e[0m +\e[38;2;59;59;59;48;2;62;62;62m▏ \e[0m\e[38;2;32;32;32m▏\e[7m\e[38;2;121;37;1m▉\e[0m\e[38;2;0;0;0;48;2;231;72;3m \e[0m\e[38;2;221;68;2m▇\e[38;2;208;64;2m▅\e[38;2;212;66;2m▂\e[38;2;123;37;0m▁\e[38;2;211;65;2m▂\e[38;2;207;64;2m▅\e[38;2;220;68;2m▇\e[48;2;231;72;3m \e[38;2;231;72;3;48;2;225;70;2m┈\e[0m\e[7m\e[38;2;221;68;2m▂\e[0m\e[38;2;44;13;0;48;2;231;72;3m \e[38;2;231;72;3;48;2;225;70;2m▉\e[0m +\e[38;2;59;59;59;48;2;62;62;62m▏ \e[0m\e[38;2;32;32;32m▏\e[0m \e[7m\e[38;2;190;59;2m▅\e[38;2;216;67;2m▃\e[38;2;225;70;2m▁\e[0m\e[38;2;95;29;0;48;2;231;72;3m \e[38;2;231;72;3;48;2;230;71;2m┈\e[48;2;231;72;3m \e[0m\e[7m\e[38;2;225;70;2m▁\e[38;2;216;67;2m▃\e[38;2;191;59;2m▅\e[0m \e[38;2;0;0;0;48;2;231;72;3m \e[38;2;231;72;3;48;2;225;70;2m▉\e[0m +\e[38;2;59;59;59;48;2;62;62;62m▏ \e[0m\e[38;2;32;32;32m▏ \e[0m \e[7m\e[38;2;172;53;1m▆\e[38;2;213;66;2m▄\e[38;2;219;68;2m▂\e[38;2;213;66;2m▄\e[38;2;174;54;2m▆\e[0m \e[38;2;0;0;0m \e[0m \e[38;2;0;0;0;48;2;231;72;3m \e[38;2;231;72;3;48;2;225;70;2m▉\e[0m +\e[38;2;59;59;59;48;2;62;62;62m▏ \e[0m\e[38;2;32;32;32m▏ \e[0m \e[38;2;0;0;0;48;2;231;72;3m \e[38;2;231;72;3;48;2;225;70;2m▉\e[0m +\e[7m\e[38;2;52;52;52m▆\e[38;2;59;59;59m▄\e[38;2;61;61;61m▂\e[0m\e[38;2;31;31;31m▏ \e[0m \e[7m\e[38;2;228;71;2m▂\e[38;2;221;69;2m▄\e[38;2;196;60;2m▆\e[0m +EOF +) + + +TEXT=( + "" + "" + "${BOLD}ProxMenux${RESET}" + "" + "${BOLD}${NEON_PURPLE_BLUE}An Interactive Menu for${RESET}" + "${BOLD}${NEON_PURPLE_BLUE}Proxmox VE management${RESET}" + "" + "" + "" + "" +) + + +mapfile -t logo_lines <<< "$LOGO" + +for i in {0..9}; do + echo -e "${TAB}${logo_lines[i]} ${WHITE}│${RESET} ${TEXT[i]}" +done +echo -e + +else + + +# Logo for terminal SSH +TEXT=( + "" + "" + "" + "" + "${BOLD}ProxMenux${RESET}" + "" + "${BOLD}${NEON_PURPLE_BLUE}An Interactive Menu for${RESET}" + "${BOLD}${NEON_PURPLE_BLUE}Proxmox VE management${RESET}" + "" + "" + "" + "" + "" + "" +) + +LOGO=( + "${DARK_GRAY}░░░░ ░░░░${RESET}" + "${DARK_GRAY}░░░░░░░ ░░░░░░ ${RESET}" + "${DARK_GRAY}░░░░░░░░░░░ ░░░░░░░ ${RESET}" + "${DARK_GRAY}░░░░ ░░░░░░ ░░░░░░ ${ORANGE}░░${RESET}" + "${DARK_GRAY}░░░░ ░░░░░░░ ${ORANGE}░░▒▒▒${RESET}" + "${DARK_GRAY}░░░░ ░░░ ${ORANGE}░▒▒▒▒▒▒▒${RESET}" + "${DARK_GRAY}░░░░ ${ORANGE}▒▒▒░ ░▒▒▒▒▒▒▒▒▒▒${RESET}" + "${DARK_GRAY}░░░░ ${ORANGE}░▒▒▒▒▒ ▒▒▒▒▒░░ ▒▒▒▒${RESET}" + "${DARK_GRAY}░░░░ ${ORANGE}░░▒▒▒▒▒▒▒░░ ▒▒▒▒${RESET}" + "${DARK_GRAY}░░░░ ${ORANGE}░░░ ▒▒▒▒${RESET}" + "${DARK_GRAY}░░░░ ${ORANGE}▒▒▒▒${RESET}" + "${DARK_GRAY}░░░░ ${ORANGE}▒▒▒░${RESET}" + "${DARK_GRAY} ░░ ${ORANGE}░░ ${RESET}" +) + +for i in {0..12}; do + echo -e "${TAB}${LOGO[i]} │${RESET} ${TEXT[i]}" +done +echo -e fi +} + +# ========================================================== + + + + cleanup_corrupted_files() { if [ -f "$CONFIG_FILE" ] && ! jq empty "$CONFIG_FILE" >/dev/null 2>&1; then @@ -135,6 +339,27 @@ uninstall_proxmenux() { echo "Uninstalling ProxMenux..." + if systemctl is-active --quiet proxmenux-monitor.service; then + echo "Stopping ProxMenux Monitor service..." + systemctl stop proxmenux-monitor.service + fi + + if systemctl is-enabled --quiet proxmenux-monitor.service 2>/dev/null; then + echo "Disabling ProxMenux Monitor service..." + systemctl disable proxmenux-monitor.service + fi + + if [ -f "$MONITOR_SERVICE_FILE" ]; then + echo "Removing ProxMenux Monitor service file..." + rm -f "$MONITOR_SERVICE_FILE" + systemctl daemon-reload + fi + + if [ -d "$MONITOR_INSTALL_DIR" ]; then + echo "Removing ProxMenux Monitor directory..." + rm -rf "$MONITOR_INSTALL_DIR" + fi + if [ -f "$VENV_PATH/bin/activate" ]; then echo "Removing googletrans and virtual environment..." source "$VENV_PATH/bin/activate" @@ -331,57 +556,102 @@ get_server_ip() { echo "$ip" } +detect_latest_appimage() { + local appimage_dir="$TEMP_DIR/AppImage" + + if [ ! -d "$appimage_dir" ]; then + return 1 + fi + + local latest_appimage=$(find "$appimage_dir" -name "ProxMenux-*.AppImage" -type f | sort -V | tail -1) + + if [ -z "$latest_appimage" ]; then + return 1 + fi + + echo "$latest_appimage" + return 0 +} + +get_appimage_version() { + local appimage_path="$1" + local filename=$(basename "$appimage_path") + + local version=$(echo "$filename" | grep -oP 'ProxMenux-\K[0-9]+\.[0-9]+\.[0-9]+') + + echo "$version" +} + install_proxmenux_monitor() { - systemctl stop proxmenux-monitor 2>/dev/null || true + local appimage_source=$(detect_latest_appimage) - # Check if URL is accessible - if ! wget --spider -q "$MONITOR_APPIMAGE_URL" 2>/dev/null; then - msg_warn "ProxMenux Monitor AppImage not available at: $MONITOR_APPIMAGE_URL" - msg_info "The monitor will be available in future releases." - return 1 + + local appimage_version=$(get_appimage_version "$appimage_source") + + if systemctl is-active --quiet proxmenux-monitor.service; then + systemctl stop proxmenux-monitor.service fi - # Download AppImage silently - if ! wget -q -O "$MONITOR_INSTALL_PATH" "$MONITOR_APPIMAGE_URL" 2>/dev/null; then - msg_warn "Failed to download ProxMenux Monitor from GitHub." - msg_info "You can install it manually later when available." - return 1 + local service_exists=false + if [ -f "$MONITOR_SERVICE_FILE" ]; then + service_exists=true fi - # Download SHA256 checksum silently - local sha256_file="/tmp/proxmenux-monitor.sha256" - if ! wget -q -O "$sha256_file" "$MONITOR_SHA256_URL" 2>/dev/null; then - msg_warn "SHA256 checksum file not available. Skipping verification." - msg_info "AppImage downloaded but integrity cannot be verified." - rm -f "$sha256_file" - else - # Verify SHA256 silently + local sha256_file="$TEMP_DIR/AppImage/ProxMenux-Monitor.AppImage.sha256" + + if [ -f "$sha256_file" ]; then + msg_info "Verifying AppImage integrity..." local expected_hash=$(cat "$sha256_file" | grep -Eo '^[a-f0-9]+' | tr -d '\n') - local actual_hash=$(sha256sum "$MONITOR_INSTALL_PATH" | awk '{print $1}') + local actual_hash=$(sha256sum "$appimage_source" | awk '{print $1}') if [ "$expected_hash" != "$actual_hash" ]; then msg_error "SHA256 verification failed! AppImage may be corrupted." - msg_info "Expected: $expected_hash" - msg_info "Got: $actual_hash" - rm -f "$MONITOR_INSTALL_PATH" "$sha256_file" return 1 fi - rm -f "$sha256_file" + msg_ok "SHA256 verification passed." + else + msg_warn "SHA256 checksum not available. Skipping verification." fi - # Make executable - chmod +x "$MONITOR_INSTALL_PATH" + msg_info "Installing ProxMenux Monitor..." + mkdir -p "$MONITOR_INSTALL_DIR" - # Show single success message at the end - msg_ok "ProxMenux Monitor installed and activated successfully." + local target_path="$MONITOR_INSTALL_DIR/ProxMenux-Monitor.AppImage" + cp "$appimage_source" "$target_path" + chmod +x "$target_path" - return 0 + msg_ok "ProxMenux Monitor v$appimage_version installed." + + if [ "$service_exists" = false ]; then + return 0 # New installation - service needs to be created + else + + systemctl start proxmenux-monitor.service + sleep 2 + + if systemctl is-active --quiet proxmenux-monitor.service; then + + update_config "proxmenux_monitor" "updated" + return 2 # Update successful + else + msg_warn "Service failed to restart. Check: journalctl -u proxmenux-monitor" + update_config "proxmenux_monitor" "failed" + return 1 + fi + fi } create_monitor_service() { msg_info "Creating ProxMenux Monitor service..." - cat > "$MONITOR_SERVICE_FILE" << EOF + local exec_path="$MONITOR_INSTALL_DIR/ProxMenux-Monitor.AppImage" + + if [ -f "$TEMP_DIR/systemd/proxmenux-monitor.service" ]; then + sed "s|ExecStart=.*|ExecStart=$exec_path|g" \ + "$TEMP_DIR/systemd/proxmenux-monitor.service" > "$MONITOR_SERVICE_FILE" + msg_ok "Using service file from repository." + else + cat > "$MONITOR_SERVICE_FILE" << EOF [Unit] Description=ProxMenux Monitor - Web Dashboard After=network.target @@ -389,8 +659,8 @@ After=network.target [Service] Type=simple User=root -WorkingDirectory=$BASE_DIR -ExecStart=$MONITOR_INSTALL_PATH +WorkingDirectory=$MONITOR_INSTALL_DIR +ExecStart=$exec_path Restart=on-failure RestartSec=10 Environment="PORT=$MONITOR_PORT" @@ -398,16 +668,15 @@ Environment="PORT=$MONITOR_PORT" [Install] WantedBy=multi-user.target EOF + msg_ok "Created default service file." + fi - # Reload systemd, enable and start service systemctl daemon-reload systemctl enable proxmenux-monitor.service > /dev/null 2>&1 systemctl start proxmenux-monitor.service > /dev/null 2>&1 - # Wait a moment for service to start sleep 3 - # Check if service is running if systemctl is-active --quiet proxmenux-monitor.service; then msg_ok "ProxMenux Monitor service started successfully." update_config "proxmenux_monitor" "installed" @@ -421,7 +690,6 @@ EOF fi } -#################################################### install_normal_version() { local total_steps=5 local current_step=1 @@ -429,13 +697,11 @@ install_normal_version() { show_progress $current_step $total_steps "Installing basic dependencies." if ! command -v jq > /dev/null 2>&1; then - # Try installing from APT (silently) apt-get update > /dev/null 2>&1 if apt-get install -y jq > /dev/null 2>&1 && command -v jq > /dev/null 2>&1; then update_config "jq" "installed" else - # Fallback: Download jq binary from GitHub local jq_url="https://github.com/jqlang/jq/releases/download/jq-1.7.1/jq-linux-amd64" if wget -q -O /usr/local/bin/jq "$jq_url" 2>/dev/null && chmod +x /usr/local/bin/jq; then if command -v jq > /dev/null 2>&1; then @@ -472,11 +738,10 @@ install_normal_version() { msg_ok "jq, dialog, curl and git installed successfully." - # -------------------------------------------------------------------------------------- - # Clone repository ((current_step++)) - show_progress $current_step $total_steps "Cloning ProxMenux repository..." + show_progress $current_step $total_steps "Install ProxMenux repository" + msg_info "Cloning ProxMenux repositoryy." if ! git clone --depth 1 "$REPO_URL" "$TEMP_DIR" 2>/dev/null; then msg_error "Failed to clone repository from $REPO_URL" exit 1 @@ -484,11 +749,8 @@ install_normal_version() { msg_ok "Repository cloned successfully." - # Change to temporary directory cd "$TEMP_DIR" - # -------------------------------------------------------------------------------------- - ((current_step++)) show_progress $current_step $total_steps "Creating directories and configuration" @@ -505,8 +767,6 @@ install_normal_version() { show_progress $current_step $total_steps "Copying necessary files" - # Note: Previous version downloaded from GitHub, now using local files - ### Copy files from local scripts directory cp "./scripts/utils.sh" "$UTILS_FILE" cp "./menu" "$INSTALL_DIR/$MENU_SCRIPT" cp "./version.txt" "$LOCAL_VERSION_FILE" @@ -517,21 +777,22 @@ install_normal_version() { chmod -R +x "$BASE_DIR/scripts/" chmod +x "$BASE_DIR/install_proxmenux.sh" msg_ok "Necessary files created." - ### chmod +x "$INSTALL_DIR/$MENU_SCRIPT" ((current_step++)) show_progress $current_step $total_steps "Installing ProxMenux Monitor" - if install_proxmenux_monitor; then + install_proxmenux_monitor + local monitor_status=$? + + if [ $monitor_status -eq 0 ]; then create_monitor_service fi msg_ok "ProxMenux Normal Version installation completed successfully." } -#################################################### install_translation_version() { local total_steps=5 local current_step=1 @@ -543,13 +804,11 @@ install_translation_version() { show_progress $current_step $total_steps "Installing system dependencies" if ! command -v jq > /dev/null 2>&1; then - # Try installing from APT (silently) apt-get update > /dev/null 2>&1 if apt-get install -y jq > /dev/null 2>&1 && command -v jq > /dev/null 2>&1; then update_config "jq" "installed" else - # Fallback: Download jq binary from GitHub local jq_url="https://github.com/jqlang/jq/releases/download/jq-1.7.1/jq-linux-amd64" if wget -q -O /usr/local/bin/jq "$jq_url" 2>/dev/null && chmod +x /usr/local/bin/jq; then if command -v jq > /dev/null 2>&1; then @@ -569,7 +828,7 @@ install_translation_version() { update_config "jq" "already_installed" fi - DEPS=("dialog" "curl" "python3" "python3-venv" "python3-pip") + DEPS=("dialog" "curl" "git" "python3" "python3-venv" "python3-pip") for pkg in "${DEPS[@]}"; do if ! dpkg -l | grep -qw "$pkg"; then if apt-get install -y "$pkg" > /dev/null 2>&1; then @@ -584,7 +843,7 @@ install_translation_version() { fi done - msg_ok "jq, dialog, curl, python3, python3-venv and python3-pip installed successfully." + msg_ok "jq, dialog, curl, git, python3, python3-venv and python3-pip installed successfully." ((current_step++)) @@ -623,6 +882,16 @@ install_translation_version() { fi deactivate + + show_progress $current_step $total_steps "Cloning ProxMenux repository" + if ! git clone --depth 1 "$REPO_URL" "$TEMP_DIR" 2>/dev/null; then + msg_error "Failed to clone repository from $REPO_URL" + exit 1 + fi + msg_ok "Repository cloned successfully." + + cd "$TEMP_DIR" + ((current_step++)) show_progress $current_step $total_steps "Copying necessary files" @@ -630,7 +899,6 @@ install_translation_version() { mkdir -p "$BASE_DIR" mkdir -p "$INSTALL_DIR" - ### Copy files from local scripts directory cp "./json/cache.json" "$CACHE_FILE" msg_ok "Cache file copied with translations." @@ -644,21 +912,24 @@ install_translation_version() { chmod -R +x "$BASE_DIR/scripts/" chmod +x "$BASE_DIR/install_proxmenux.sh" msg_ok "Necessary files created." - ### chmod +x "$INSTALL_DIR/$MENU_SCRIPT" ((current_step++)) show_progress $current_step $total_steps "Installing ProxMenux Monitor" - if install_proxmenux_monitor; then + install_proxmenux_monitor + local monitor_status=$? + + if [ $monitor_status -eq 0 ]; then create_monitor_service + elif [ $monitor_status -eq 2 ]; then + msg_ok "ProxMenux Monitor updated successfully." fi msg_ok "ProxMenux Translation Version installation completed successfully." } -#################################################### show_installation_options() { local current_install_type current_install_type=$(check_existing_installation) @@ -709,7 +980,6 @@ show_installation_options() { exit 1 fi - # For new installations, show confirmation with details if [ "$current_install_type" = "none" ]; then if ! show_installation_confirmation "$INSTALL_TYPE"; then show_proxmenux_logo @@ -744,17 +1014,21 @@ install_proxmenux() { exit 1 ;; esac + + if [[ -f "$UTILS_FILE" ]]; then + source "$UTILS_FILE" + fi - msg_title "$(translate "ProxMenux has been installed successfully")" + msg_title "ProxMenux has been installed successfully" if systemctl is-active --quiet proxmenux-monitor.service; then local server_ip=$(get_server_ip) - echo -e "${GN}🌐 $(translate "ProxMenux Monitor activated")${CL}: ${BL}http://${server_ip}:${MONITOR_PORT}${CL}" + echo -e "${GN}🌐 ProxMenux Monitor activated${CL}: ${BL}http://${server_ip}:${MONITOR_PORT}${CL}" echo fi echo -ne "${GN}" - type_text "$(translate "To run ProxMenux, simply execute this command in the console or terminal:")" + type_text "To run ProxMenux, simply execute this command in the console or terminal:" echo -e "${YWB} menu${CL}" echo } From 7b1111430b6503995ba1f2f40cd20a2a05198adc Mon Sep 17 00:00:00 2001 From: cod378 Date: Thu, 13 Nov 2025 03:22:52 +0000 Subject: [PATCH 106/114] chore: remove unused offline installer script --- install_proxmenux_offline.sh | 73 ------------------------------------ 1 file changed, 73 deletions(-) delete mode 100644 install_proxmenux_offline.sh diff --git a/install_proxmenux_offline.sh b/install_proxmenux_offline.sh deleted file mode 100644 index b0b896c..0000000 --- a/install_proxmenux_offline.sh +++ /dev/null @@ -1,73 +0,0 @@ -#!/bin/bash - -# ========================================================== -# ProxMenux Offline Installer -# ========================================================== -# This script clones the ProxMenux repository to a temporary -# location, runs the installer, and then cleans up. -# ========================================================== - -set -e # Exit on error - -# Configuration -REPO_URL="https://github.com/c78-contrib/ProxMenuxOffline.git" -TEMP_DIR="/tmp/proxmenux-install-$$" -INSTALLER_SCRIPT="install_proxmenux.sh" - -# Colors for output -RED='\033[0;31m' -GREEN='\033[0;32m' -YELLOW='\033[1;33m' -NC='\033[0m' # No Color - -# Cleanup function -cleanup() { - if [ -d "$TEMP_DIR" ]; then - echo -e "${YELLOW}Cleaning up temporary files...${NC}" - rm -rf "$TEMP_DIR" - echo -e "${GREEN}Cleanup completed.${NC}" - fi -} - -# Set trap to ensure cleanup on exit -trap cleanup EXIT - -# Check if running as root -if [ "$(id -u)" -ne 0 ]; then - echo -e "${RED}Error: This script must be run as root.${NC}" - exit 1 -fi - -# Check if git is installed -if ! command -v git &> /dev/null; then - echo -e "${YELLOW}Git is not installed. Installing git...${NC}" - apt-get update -qq - apt-get install -y git -fi - -# Clone repository -echo -e "${GREEN}Cloning ProxMenux repository...${NC}" -if ! git clone --depth 1 "$REPO_URL" "$TEMP_DIR" 2>&1; then - echo -e "${RED}Error: Failed to clone repository from $REPO_URL${NC}" - exit 1 -fi - -# Change to temporary directory -cd "$TEMP_DIR" - -# Check if installer exists -if [ ! -f "$INSTALLER_SCRIPT" ]; then - echo -e "${RED}Error: Installer script '$INSTALLER_SCRIPT' not found in repository.${NC}" - exit 1 -fi - -# Make installer executable -chmod +x "$INSTALLER_SCRIPT" - -# Run the installer -echo -e "${GREEN}Running ProxMenux installer...${NC}" -echo "----------------------------------------" -bash "$INSTALLER_SCRIPT" - -echo "----------------------------------------" -echo -e "${GREEN}Installation completed successfully!${NC}" From 97fc72b78ade641f805127c293b486bf104541b2 Mon Sep 17 00:00:00 2001 From: cod378 Date: Thu, 13 Nov 2025 03:23:11 +0000 Subject: [PATCH 107/114] fix: add validation for missing ProxMenux Monitor AppImage - Check if AppImage exists before attempting installation - Display clear error message when AppImage is not found - Update config to track installation failure state --- install_proxmenux.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/install_proxmenux.sh b/install_proxmenux.sh index 8bf36bc..24e418c 100755 --- a/install_proxmenux.sh +++ b/install_proxmenux.sh @@ -585,6 +585,12 @@ get_appimage_version() { install_proxmenux_monitor() { local appimage_source=$(detect_latest_appimage) + if [ -z "$appimage_source" ] || [ ! -f "$appimage_source" ]; then + msg_error "ProxMenux Monitor AppImage not found in $TEMP_DIR/AppImage/" + msg_warn "Please ensure the AppImage directory exists with ProxMenux-*.AppImage files." + update_config "proxmenux_monitor" "appimage_not_found" + return 1 + fi local appimage_version=$(get_appimage_version "$appimage_source") From 469874e97501207de020129018cfc0dbfe7dab58 Mon Sep 17 00:00:00 2001 From: ProxMenuxBot Date: Fri, 14 Nov 2025 01:37:35 +0000 Subject: [PATCH 108/114] Update helpers_cache.json --- json/helpers_cache.json | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/json/helpers_cache.json b/json/helpers_cache.json index 97aa34c..aedfa96 100644 --- a/json/helpers_cache.json +++ b/json/helpers_cache.json @@ -441,20 +441,6 @@ "notes": [], "type": "ct" }, - { - "name": "Barcode Buddy", - "slug": "barcode-buddy", - "desc": "Barcode Buddy for Grocy is an extension for Grocy, allowing to pass barcodes to Grocy. It supports barcodes for products and chores. If you own a physical barcode scanner, it can be integrated, so that all barcodes scanned are automatically pushed to BarcodeBuddy/Grocy.", - "script": "ct/barcode-buddy.sh", - "script_url": "https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/ct/barcode-buddy.sh", - "categories": [ - 24 - ], - "notes": [ - "After install enable the option \"Use Redis cache\" on the settings page." - ], - "type": "ct" - }, { "name": "Bazarr", "slug": "bazarr", @@ -3071,6 +3057,20 @@ ], "type": "addon" }, + { + "name": "NetVisor", + "slug": "netvisor", + "desc": "Automatically discover and visually document network infrastructure", + "script": "ct/netvisor.sh", + "script_url": "https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/ct/netvisor.sh", + "categories": [ + 9 + ], + "notes": [ + "The integrated daemon config is located at `/root/.config/daemon/config.json`" + ], + "type": "ct" + }, { "name": "Nextcloud", "slug": "nextcloud-vm", From d345f9651827228b208400918cbe22d7923b7280 Mon Sep 17 00:00:00 2001 From: cod378 Date: Fri, 14 Nov 2025 01:49:39 +0000 Subject: [PATCH 109/114] feat: add ProxMenux Monitor uninstallation to config menu - Add uninstall_proxmenux_monitor() function with systemd service cleanup - Stop and disable monitor service if active - Remove systemd unit file and reload daemon - Integrate monitor uninstallation into main uninstall_proxmenu() workflow - Define MONITOR_UNIT_FILE constant for service file path --- scripts/menus/config_menu.sh | 40 ++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/scripts/menus/config_menu.sh b/scripts/menus/config_menu.sh index eaab541..792a38b 100644 --- a/scripts/menus/config_menu.sh +++ b/scripts/menus/config_menu.sh @@ -19,7 +19,9 @@ LOCAL_VERSION_FILE="$BASE_DIR/version.txt" INSTALL_DIR="/usr/local/bin" MENU_SCRIPT="menu" VENV_PATH="/opt/googletrans-env" + MONITOR_SERVICE="proxmenux-monitor.service" +MONITOR_UNIT_FILE="/etc/systemd/system/${MONITOR_SERVICE}" if [[ -f "$UTILS_FILE" ]]; then source "$UTILS_FILE" @@ -30,6 +32,41 @@ initialize_cache # ========================================================== +uninstall_proxmenux_monitor() { + + # 1. Stop service if it is running + if systemctl is-active --quiet "${MONITOR_SERVICE_NAME}"; then + echo " - Stoping service..." + systemctl stop "${MONITOR_SERVICE_NAME}" + else + echo " - Service is not running (ok)" + fi + + # 2. Disable service if enabled + if systemctl is-enabled --quiet "${MONITOR_SERVICE_NAME}"; then + echo " - Disabling service..." + systemctl disable "${MONITOR_SERVICE_NAME}" + else + echo " - Service is not enabled (ok)" + fi + + # 3. Remove unit file + if [ -f "${MONITOR_UNIT_FILE}" ]; then + echo " - Removing unit file ${MONITOR_UNIT_FILE}..." + rm -f "${MONITOR_UNIT_FILE}" + else + echo " - Unit file ${MONITOR_UNIT_FILE} does not exist (ok)" + fi + + # 4. Reload systemd + echo " - Recargando systemd..." + systemctl daemon-reload + systemctl reset-failed || true + + echo "==> Service ${MONITOR_SERVICE_NAME} uninstalled." + +} + detect_installation_type() { local has_venv=false local has_language=false @@ -400,6 +437,9 @@ uninstall_proxmenu() { done apt-get autoremove -y --purge >/dev/null 2>&1 fi + + echo "80" ; echo "Removing ProxMenux Monitor..." + uninstall_proxmenux_monitor echo "90" ; echo "Restoring system files..." # Restore .bashrc and motd From e392f6a2b7530031641bb502d8c5c64155c9b689 Mon Sep 17 00:00:00 2001 From: cod378 Date: Fri, 14 Nov 2025 02:20:07 +0000 Subject: [PATCH 110/114] feat: add cod378 to contributors list in config_menu.sh --- scripts/menus/config_menu.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/menus/config_menu.sh b/scripts/menus/config_menu.sh index 792a38b..a2491c2 100644 --- a/scripts/menus/config_menu.sh +++ b/scripts/menus/config_menu.sh @@ -4,6 +4,7 @@ # ========================================================== # Author : MacRimi # Copyright : (c) 2024 MacRimi +# Contributors : cod378 # License : (CC BY-NC 4.0) (https://github.com/MacRimi/ProxMenux/blob/main/LICENSE) # Version : 1.1 # Last Updated: 04/07/2025 From ba595c971969acea8fb5fa4a5d094cf61652e55a Mon Sep 17 00:00:00 2001 From: cod378 Date: Fri, 14 Nov 2025 02:21:00 +0000 Subject: [PATCH 111/114] feat: add test installer script with offline support and ProxMenux Monitor uninstaller --- install_proxmenux_test.sh | 1048 +++++++++++++++++++++++++++++++++++++ 1 file changed, 1048 insertions(+) create mode 100755 install_proxmenux_test.sh diff --git a/install_proxmenux_test.sh b/install_proxmenux_test.sh new file mode 100755 index 0000000..61562ab --- /dev/null +++ b/install_proxmenux_test.sh @@ -0,0 +1,1048 @@ +#!/bin/bash + +# ========================================================== +# ProxMenux - A menu-driven toolkit for Proxmox VE management +# ========================================================== +# Author : MacRimi +# Contributors : cod378 +# Subproject : ProxMenux Monitor (System Health & Web Dashboard) +# Copyright : (c) 2024-2025 MacRimi +# License : (CC BY-NC 4.0) (https://github.com/MacRimi/ProxMenux/blob/main/LICENSE) +# Version : 1.4 +# Last Updated : 12/11/2025 +# ========================================================== +# Description: +# This script installs and configures ProxMenux, a menu-driven +# toolkit for managing and optimizing Proxmox VE servers. +# +# - Ensures the script is run with root privileges. +# - Displays an installation confirmation prompt. +# - Installs required dependencies: +# • whiptail (interactive terminal menus) +# • curl (downloads and connectivity checks) +# • jq (JSON parsing) +# • Python 3 + venv (for translation support) +# - Creates the ProxMenux base directories and configuration files: +# • $BASE_DIR/config.json +# • $BASE_DIR/cache.json +# - Copies local project files into the target paths (offline mode by default): +# • scripts/* → $BASE_DIR/scripts/ +# • utils.sh → $BASE_DIR/scripts/utils.sh +# • menu → $INSTALL_DIR/menu (main launcher) +# • install_proxmenux.sh → $BASE_DIR/install_proxmenux.sh +# - Sets correct permissions for all executables. +# - Displays the final instruction on how to start ProxMenux ("menu"). +# +# Notes: +# - This installer supports both offline and online setups. +# - ProxMenux Monitor can be installed later as an optional module +# to provide real-time system monitoring and a web dashboard. +# ========================================================== + +# Configuration ============================================ +LOCAL_SCRIPTS="/usr/local/share/proxmenux/scripts" +INSTALL_DIR="/usr/local/bin" +BASE_DIR="/usr/local/share/proxmenux" +CONFIG_FILE="$BASE_DIR/config.json" +CACHE_FILE="$BASE_DIR/cache.json" +UTILS_FILE="$BASE_DIR/utils.sh" +LOCAL_VERSION_FILE="$BASE_DIR/version.txt" +MENU_SCRIPT="menu" +VENV_PATH="/opt/googletrans-env" + +MONITOR_INSTALL_DIR="$BASE_DIR/monitor" +MONITOR_SERVICE_FILE="/etc/systemd/system/proxmenux-monitor.service" +MONITOR_PORT=8008 + +# Offline installer envs +REPO_URL="https://github.com/c78-contrib/ProxMenuxOffline.git" +TEMP_DIR="/tmp/proxmenux-install-$$" + +# Load utility functions +NEON_PURPLE_BLUE="\033[38;5;99m" +WHITE="\033[38;5;15m" +RESET="\033[0m" +DARK_GRAY="\033[38;5;244m" +ORANGE="\033[38;5;208m" +YW="\033[33m" +YWB="\033[1;33m" +GN="\033[1;92m" +RD="\033[01;31m" +CL="\033[m" +BL="\033[36m" +DGN="\e[32m" +BGN="\e[1;32m" +DEF="\e[1;36m" +CUS="\e[38;5;214m" +BOLD="\033[1m" +BFR="\\r\\033[K" +HOLD="-" +BOR=" | " +CM="${GN}✓ ${CL}" +TAB=" " + + +# Create and display spinner +spinner() { + local frames=('⠋' '⠙' '⠹' '⠸' '⠼' '⠴' '⠦' '⠧' '⠇' '⠏') + local spin_i=0 + local interval=0.1 + printf "\e[?25l" + + local color="${YW}" + + while true; do + printf "\r ${color}%s${CL}" "${frames[spin_i]}" + spin_i=$(( (spin_i + 1) % ${#frames[@]} )) + sleep "$interval" + done +} + + +# Function to simulate typing effect +type_text() { + local text="$1" + local delay=0.05 + for ((i=0; i<${#text}; i++)); do + echo -n "${text:$i:1}" + sleep $delay + done + echo +} + + +# Display info message with spinner +msg_info() { + local msg="$1" + echo -ne "${TAB}${YW}${HOLD}${msg}" + spinner & + SPINNER_PID=$! +} + + +# Display info2 message +msg_info2() { + local msg="$1" + echo -e "${TAB}${BOLD}${YW}${HOLD}${msg}${CL}" +} + + + +# Display title script +msg_title() { + local msg="$1" + echo -e "\n" + echo -e "${TAB}${BOLD}${HOLD}${BOR}${msg}${BOR}${HOLD}${CL}" + echo -e "\n" +} + + +# Display warning or highlighted information message +msg_warn() { + if [ -n "$SPINNER_PID" ] && ps -p $SPINNER_PID > /dev/null; then + kill $SPINNER_PID > /dev/null + fi + printf "\e[?25h" + local msg="$1" + echo -e "${BFR}${TAB}${CL} ${YWB}${msg}${CL}" +} + + +# Display success message +msg_ok() { + if [ -n "$SPINNER_PID" ] && ps -p $SPINNER_PID > /dev/null; then + kill $SPINNER_PID > /dev/null + fi + printf "\e[?25h" + local msg="$1" + echo -e "${BFR}${TAB}${CM}${GN}${msg}${CL}" +} + + +# Display error message +msg_error() { + if [ -n "$SPINNER_PID" ] && ps -p $SPINNER_PID > /dev/null; then + kill $SPINNER_PID > /dev/null + fi + printf "\e[?25h" + local msg="$1" + echo -e "${BFR}${TAB}${RD}[ERROR] ${msg}${CL}" +} + + + + +show_proxmenux_logo() { +clear + +if [[ -z "$SSH_TTY" && -z "$(who am i | awk '{print $NF}' | grep -E '([0-9]{1,3}\.){3}[0-9]{1,3}')" ]]; then + +# Logo for terminal noVNC + +LOGO=$(cat << "EOF" +\e[0m\e[38;2;61;61;61m▆\e[38;2;60;60;60m▄\e[38;2;54;54;54m▂\e[0m \e[38;2;0;0;0m \e[0m \e[38;2;54;54;54m▂\e[38;2;60;60;60m▄\e[38;2;61;61;61m▆\e[0m +\e[38;2;59;59;59;48;2;62;62;62m▏ \e[38;2;61;61;61;48;2;37;37;37m▇\e[0m\e[38;2;60;60;60m▅\e[38;2;56;56;56m▃\e[38;2;37;37;37m▁ \e[38;2;36;36;36m▁\e[38;2;56;56;56m▃\e[38;2;60;60;60m▅\e[38;2;61;61;61;48;2;37;37;37m▇\e[48;2;62;62;62m \e[0m\e[7m\e[38;2;60;60;60m▁\e[0m +\e[38;2;59;59;59;48;2;62;62;62m▏ \e[0m\e[7m\e[38;2;61;61;61m▂\e[0m\e[38;2;62;62;62;48;2;61;61;61m┈\e[48;2;62;62;62m \e[48;2;61;61;61m┈\e[0m\e[38;2;60;60;60m▆\e[38;2;57;57;57m▄\e[38;2;48;48;48m▂\e[0m \e[38;2;47;47;47m▂\e[38;2;57;57;57m▄\e[38;2;60;60;60m▆\e[38;2;62;62;62;48;2;61;61;61m┈\e[48;2;62;62;62m \e[48;2;61;61;61m┈\e[0m\e[7m\e[38;2;60;60;60m▂\e[38;2;57;57;57m▄\e[38;2;47;47;47m▆\e[0m \e[0m +\e[38;2;59;59;59;48;2;62;62;62m▏ \e[0m\e[38;2;32;32;32m▏\e[7m\e[38;2;39;39;39m▇\e[38;2;57;57;57m▅\e[38;2;60;60;60m▃\e[0m\e[38;2;40;40;40;48;2;61;61;61m▁\e[48;2;62;62;62m \e[38;2;54;54;54;48;2;61;61;61m┊\e[48;2;62;62;62m \e[38;2;39;39;39;48;2;61;61;61m▁\e[0m\e[7m\e[38;2;60;60;60m▃\e[38;2;57;57;57m▅\e[38;2;38;38;38m▇\e[0m \e[38;2;193;60;2m▃\e[38;2;217;67;2m▅\e[38;2;225;70;2m▇\e[0m +\e[38;2;59;59;59;48;2;62;62;62m▏ \e[0m\e[38;2;32;32;32m▏\e[0m \e[38;2;203;63;2m▄\e[38;2;147;45;1m▂\e[0m \e[7m\e[38;2;55;55;55m▆\e[38;2;60;60;60m▄\e[38;2;61;61;61m▂\e[38;2;60;60;60m▄\e[38;2;55;55;55m▆\e[0m \e[38;2;144;44;1m▂\e[38;2;202;62;2m▄\e[38;2;219;68;2m▆\e[38;2;231;72;3;48;2;226;70;2m┈\e[48;2;231;72;3m \e[48;2;225;70;2m▉\e[0m +\e[38;2;59;59;59;48;2;62;62;62m▏ \e[0m\e[38;2;32;32;32m▏\e[7m\e[38;2;121;37;1m▉\e[0m\e[38;2;0;0;0;48;2;231;72;3m \e[0m\e[38;2;221;68;2m▇\e[38;2;208;64;2m▅\e[38;2;212;66;2m▂\e[38;2;123;37;0m▁\e[38;2;211;65;2m▂\e[38;2;207;64;2m▅\e[38;2;220;68;2m▇\e[48;2;231;72;3m \e[38;2;231;72;3;48;2;225;70;2m┈\e[0m\e[7m\e[38;2;221;68;2m▂\e[0m\e[38;2;44;13;0;48;2;231;72;3m \e[38;2;231;72;3;48;2;225;70;2m▉\e[0m +\e[38;2;59;59;59;48;2;62;62;62m▏ \e[0m\e[38;2;32;32;32m▏\e[0m \e[7m\e[38;2;190;59;2m▅\e[38;2;216;67;2m▃\e[38;2;225;70;2m▁\e[0m\e[38;2;95;29;0;48;2;231;72;3m \e[38;2;231;72;3;48;2;230;71;2m┈\e[48;2;231;72;3m \e[0m\e[7m\e[38;2;225;70;2m▁\e[38;2;216;67;2m▃\e[38;2;191;59;2m▅\e[0m \e[38;2;0;0;0;48;2;231;72;3m \e[38;2;231;72;3;48;2;225;70;2m▉\e[0m +\e[38;2;59;59;59;48;2;62;62;62m▏ \e[0m\e[38;2;32;32;32m▏ \e[0m \e[7m\e[38;2;172;53;1m▆\e[38;2;213;66;2m▄\e[38;2;219;68;2m▂\e[38;2;213;66;2m▄\e[38;2;174;54;2m▆\e[0m \e[38;2;0;0;0m \e[0m \e[38;2;0;0;0;48;2;231;72;3m \e[38;2;231;72;3;48;2;225;70;2m▉\e[0m +\e[38;2;59;59;59;48;2;62;62;62m▏ \e[0m\e[38;2;32;32;32m▏ \e[0m \e[38;2;0;0;0;48;2;231;72;3m \e[38;2;231;72;3;48;2;225;70;2m▉\e[0m +\e[7m\e[38;2;52;52;52m▆\e[38;2;59;59;59m▄\e[38;2;61;61;61m▂\e[0m\e[38;2;31;31;31m▏ \e[0m \e[7m\e[38;2;228;71;2m▂\e[38;2;221;69;2m▄\e[38;2;196;60;2m▆\e[0m +EOF +) + + +TEXT=( + "" + "" + "${BOLD}ProxMenux${RESET}" + "" + "${BOLD}${NEON_PURPLE_BLUE}An Interactive Menu for${RESET}" + "${BOLD}${NEON_PURPLE_BLUE}Proxmox VE management${RESET}" + "" + "" + "" + "" +) + + +mapfile -t logo_lines <<< "$LOGO" + +for i in {0..9}; do + echo -e "${TAB}${logo_lines[i]} ${WHITE}│${RESET} ${TEXT[i]}" +done +echo -e + +else + + +# Logo for terminal SSH +TEXT=( + "" + "" + "" + "" + "${BOLD}ProxMenux${RESET}" + "" + "${BOLD}${NEON_PURPLE_BLUE}An Interactive Menu for${RESET}" + "${BOLD}${NEON_PURPLE_BLUE}Proxmox VE management${RESET}" + "" + "" + "" + "" + "" + "" +) + +LOGO=( + "${DARK_GRAY}░░░░ ░░░░${RESET}" + "${DARK_GRAY}░░░░░░░ ░░░░░░ ${RESET}" + "${DARK_GRAY}░░░░░░░░░░░ ░░░░░░░ ${RESET}" + "${DARK_GRAY}░░░░ ░░░░░░ ░░░░░░ ${ORANGE}░░${RESET}" + "${DARK_GRAY}░░░░ ░░░░░░░ ${ORANGE}░░▒▒▒${RESET}" + "${DARK_GRAY}░░░░ ░░░ ${ORANGE}░▒▒▒▒▒▒▒${RESET}" + "${DARK_GRAY}░░░░ ${ORANGE}▒▒▒░ ░▒▒▒▒▒▒▒▒▒▒${RESET}" + "${DARK_GRAY}░░░░ ${ORANGE}░▒▒▒▒▒ ▒▒▒▒▒░░ ▒▒▒▒${RESET}" + "${DARK_GRAY}░░░░ ${ORANGE}░░▒▒▒▒▒▒▒░░ ▒▒▒▒${RESET}" + "${DARK_GRAY}░░░░ ${ORANGE}░░░ ▒▒▒▒${RESET}" + "${DARK_GRAY}░░░░ ${ORANGE}▒▒▒▒${RESET}" + "${DARK_GRAY}░░░░ ${ORANGE}▒▒▒░${RESET}" + "${DARK_GRAY} ░░ ${ORANGE}░░ ${RESET}" +) + +for i in {0..12}; do + echo -e "${TAB}${LOGO[i]} │${RESET} ${TEXT[i]}" +done +echo -e +fi + +} + +# ========================================================== + + + + + +cleanup_corrupted_files() { + if [ -f "$CONFIG_FILE" ] && ! jq empty "$CONFIG_FILE" >/dev/null 2>&1; then + echo "Cleaning up corrupted configuration file..." + rm -f "$CONFIG_FILE" + fi + if [ -f "$CACHE_FILE" ] && ! jq empty "$CACHE_FILE" >/dev/null 2>&1; then + echo "Cleaning up corrupted cache file..." + rm -f "$CACHE_FILE" + fi +} + +# Cleanup function +cleanup() { + if [ -d "$TEMP_DIR" ]; then + rm -rf "$TEMP_DIR" + fi +} + +# Set trap to ensure cleanup on exit +trap cleanup EXIT + + +# ========================================================== +check_existing_installation() { + local has_venv=false + local has_config=false + local has_language=false + local has_menu=false + + if [ -f "$INSTALL_DIR/$MENU_SCRIPT" ]; then + has_menu=true + fi + + if [ -d "$VENV_PATH" ] && [ -f "$VENV_PATH/bin/activate" ]; then + has_venv=true + fi + + if [ -f "$CONFIG_FILE" ]; then + if jq empty "$CONFIG_FILE" >/dev/null 2>&1; then + has_config=true + local current_language=$(jq -r '.language // empty' "$CONFIG_FILE" 2>/dev/null) + if [[ -n "$current_language" && "$current_language" != "null" && "$current_language" != "empty" ]]; then + has_language=true + fi + else + echo "Warning: Corrupted config file detected, removing..." + rm -f "$CONFIG_FILE" + fi + fi + + if [ "$has_venv" = true ] && [ "$has_language" = true ]; then + echo "translation" + elif [ "$has_menu" = true ] && [ "$has_venv" = false ]; then + echo "normal" + elif [ "$has_menu" = true ]; then + echo "unknown" + else + echo "none" + fi +} + +uninstall_proxmenux() { + local install_type="$1" + local force_clean="$2" + + if [ "$force_clean" != "force" ]; then + if ! whiptail --title "Uninstall ProxMenux" --yesno "Are you sure you want to uninstall ProxMenux?" 10 60; then + return 1 + fi + fi + + echo "Uninstalling ProxMenux..." + + if systemctl is-active --quiet proxmenux-monitor.service; then + echo "Stopping ProxMenux Monitor service..." + systemctl stop proxmenux-monitor.service + fi + + if systemctl is-enabled --quiet proxmenux-monitor.service 2>/dev/null; then + echo "Disabling ProxMenux Monitor service..." + systemctl disable proxmenux-monitor.service + fi + + if [ -f "$MONITOR_SERVICE_FILE" ]; then + echo "Removing ProxMenux Monitor service file..." + rm -f "$MONITOR_SERVICE_FILE" + systemctl daemon-reload + fi + + if [ -d "$MONITOR_INSTALL_DIR" ]; then + echo "Removing ProxMenux Monitor directory..." + rm -rf "$MONITOR_INSTALL_DIR" + fi + + if [ -f "$VENV_PATH/bin/activate" ]; then + echo "Removing googletrans and virtual environment..." + source "$VENV_PATH/bin/activate" + pip uninstall -y googletrans >/dev/null 2>&1 + deactivate + rm -rf "$VENV_PATH" + fi + + if [ "$install_type" = "translation" ] && [ "$force_clean" != "force" ]; then + DEPS_TO_REMOVE=$(whiptail --title "Remove Translation Dependencies" --checklist \ + "Select translation-specific dependencies to remove:" 15 60 3 \ + "python3-venv" "Python virtual environment" OFF \ + "python3-pip" "Python package installer" OFF \ + "python3" "Python interpreter" OFF \ + 3>&1 1>&2 2>&3) + + if [ -n "$DEPS_TO_REMOVE" ]; then + echo "Removing selected dependencies..." + read -r -a DEPS_ARRAY <<< "$(echo "$DEPS_TO_REMOVE" | tr -d '"')" + for dep in "${DEPS_ARRAY[@]}"; do + echo "Removing $dep..." + apt-mark auto "$dep" >/dev/null 2>&1 + apt-get -y --purge autoremove "$dep" >/dev/null 2>&1 + done + apt-get autoremove -y --purge >/dev/null 2>&1 + fi + fi + + rm -f "$INSTALL_DIR/$MENU_SCRIPT" + rm -rf "$BASE_DIR" + + [ -f /root/.bashrc.bak ] && mv /root/.bashrc.bak /root/.bashrc + if [ -f /etc/motd.bak ]; then + mv /etc/motd.bak /etc/motd + else + sed -i '/This system is optimised by: ProxMenux/d' /etc/motd + fi + + echo "ProxMenux has been uninstalled." + return 0 +} + +handle_installation_change() { + local current_type="$1" + local new_type="$2" + + if [ "$current_type" = "$new_type" ]; then + return 0 + fi + + case "$current_type-$new_type" in + "translation-1"|"translation-normal") + if whiptail --title "Installation Type Change" \ + --yesno "Switch from Translation to Normal Version?\n\nThis will remove translation components." 10 60; then + echo "Preparing for installation type change..." + uninstall_proxmenux "translation" "force" >/dev/null 2>&1 + return 0 + else + return 1 + fi + ;; + "normal-2"|"normal-translation") + if whiptail --title "Installation Type Change" \ + --yesno "Switch from Normal to Translation Version?\n\nThis will add translation components." 10 60; then + return 0 + else + return 1 + fi + ;; + *) + return 0 + ;; + esac +} + +update_config() { + local component="$1" + local status="$2" + local timestamp=$(date -u +"%Y-%m-%dT%H:%M:%SZ") + + local tracked_components=("dialog" "curl" "jq" "python3" "python3-venv" "python3-pip" "virtual_environment" "pip" "googletrans" "proxmenux_monitor") + + if [[ " ${tracked_components[@]} " =~ " ${component} " ]]; then + mkdir -p "$(dirname "$CONFIG_FILE")" + + if [ ! -f "$CONFIG_FILE" ] || ! jq empty "$CONFIG_FILE" >/dev/null 2>&1; then + echo '{}' > "$CONFIG_FILE" + fi + + local tmp_file=$(mktemp) + if jq --arg comp "$component" --arg stat "$status" --arg time "$timestamp" \ + '.[$comp] = {status: $stat, timestamp: $time}' "$CONFIG_FILE" > "$tmp_file" 2>/dev/null; then + mv "$tmp_file" "$CONFIG_FILE" + else + echo '{}' > "$CONFIG_FILE" + jq --arg comp "$component" --arg stat "$status" --arg time "$timestamp" \ + '.[$comp] = {status: $stat, timestamp: $time}' "$CONFIG_FILE" > "$tmp_file" && mv "$tmp_file" "$CONFIG_FILE" + fi + + [ -f "$tmp_file" ] && rm -f "$tmp_file" + fi +} + +show_progress() { + local step="$1" + local total="$2" + local message="$3" + + echo -e "\n${BOLD}${BL}${TAB}Installing ProxMenux: Step $step of $total${CL}" + echo + msg_info2 "$message" +} + +select_language() { + if [ -f "$CONFIG_FILE" ] && jq empty "$CONFIG_FILE" >/dev/null 2>&1; then + local existing_language=$(jq -r '.language // empty' "$CONFIG_FILE" 2>/dev/null) + if [[ -n "$existing_language" && "$existing_language" != "null" && "$existing_language" != "empty" ]]; then + LANGUAGE="$existing_language" + msg_ok "Using existing language configuration: $LANGUAGE" + return 0 + fi + fi + + LANGUAGE=$(whiptail --title "Select Language" --menu "Choose a language for the menu:" 20 60 12 \ + "en" "English (Recommended)" \ + "es" "Spanish" \ + "fr" "French" \ + "de" "German" \ + "it" "Italian" \ + "pt" "Portuguese" 3>&1 1>&2 2>&3) + + if [ -z "$LANGUAGE" ]; then + msg_error "No language selected. Exiting." + exit 1 + fi + + mkdir -p "$(dirname "$CONFIG_FILE")" + + if [ ! -f "$CONFIG_FILE" ] || ! jq empty "$CONFIG_FILE" >/dev/null 2>&1; then + echo '{}' > "$CONFIG_FILE" + fi + + local tmp_file=$(mktemp) + if jq --arg lang "$LANGUAGE" '. + {language: $lang}' "$CONFIG_FILE" > "$tmp_file" 2>/dev/null; then + mv "$tmp_file" "$CONFIG_FILE" + else + echo "{\"language\": \"$LANGUAGE\"}" > "$CONFIG_FILE" + fi + + [ -f "$tmp_file" ] && rm -f "$tmp_file" + + msg_ok "Language set to: $LANGUAGE" +} + +# Show installation confirmation for new installations +show_installation_confirmation() { + local install_type="$1" + + case "$install_type" in + "1") + if whiptail --title "ProxMenux - Normal Version Installation" \ + --yesno "ProxMenux Normal Version will install:\n\n• dialog (interactive menus) - Official Debian package\n• curl (file downloads) - Official Debian package\n• jq (JSON processing) - Official Debian package\n• ProxMenux core files (/usr/local/share/proxmenux)\n• ProxMenux Monitor (Web dashboard on port 8008)\n\nThis is a lightweight installation with minimal dependencies.\n\nProceed with installation?" 20 70; then + return 0 + else + return 1 + fi + ;; + "2") + if whiptail --title "ProxMenux - Translation Version Installation" \ + --yesno "ProxMenux Translation Version will install:\n\n• dialog (interactive menus)\n• curl (file downloads)\n• jq (JSON processing)\n• python3 + python3-venv + python3-pip\n• Google Translate library (googletrans)\n• Virtual environment (/opt/googletrans-env)\n• Translation cache system\n• ProxMenux core files\n• ProxMenux Monitor (Web dashboard on port 8008)\n\nThis version requires more dependencies for translation support.\n\nProceed with installation?" 20 70; then + return 0 + else + return 1 + fi + ;; + esac +} + +get_server_ip() { + local ip + # Try to get the primary IP address + ip=$(ip route get 1.1.1.1 2>/dev/null | grep -oP 'src \K\S+') + + if [ -z "$ip" ]; then + # Fallback: get first non-loopback IP + ip=$(hostname -I | awk '{print $1}') + fi + + if [ -z "$ip" ]; then + # Last resort: use localhost + ip="localhost" + fi + + echo "$ip" +} + +detect_latest_appimage() { + local appimage_dir="$TEMP_DIR/AppImage" + + if [ ! -d "$appimage_dir" ]; then + return 1 + fi + + local latest_appimage=$(find "$appimage_dir" -name "ProxMenux-*.AppImage" -type f | sort -V | tail -1) + + if [ -z "$latest_appimage" ]; then + return 1 + fi + + echo "$latest_appimage" + return 0 +} + +get_appimage_version() { + local appimage_path="$1" + local filename=$(basename "$appimage_path") + + local version=$(echo "$filename" | grep -oP 'ProxMenux-\K[0-9]+\.[0-9]+\.[0-9]+') + + echo "$version" +} + +install_proxmenux_monitor() { + local appimage_source=$(detect_latest_appimage) + + if [ -z "$appimage_source" ] || [ ! -f "$appimage_source" ]; then + msg_error "ProxMenux Monitor AppImage not found in $TEMP_DIR/AppImage/" + msg_warn "Please ensure the AppImage directory exists with ProxMenux-*.AppImage files." + update_config "proxmenux_monitor" "appimage_not_found" + return 1 + fi + + local appimage_version=$(get_appimage_version "$appimage_source") + + if systemctl is-active --quiet proxmenux-monitor.service; then + systemctl stop proxmenux-monitor.service + fi + + local service_exists=false + if [ -f "$MONITOR_SERVICE_FILE" ]; then + service_exists=true + fi + + local sha256_file="$TEMP_DIR/AppImage/ProxMenux-Monitor.AppImage.sha256" + + if [ -f "$sha256_file" ]; then + msg_info "Verifying AppImage integrity..." + local expected_hash=$(cat "$sha256_file" | grep -Eo '^[a-f0-9]+' | tr -d '\n') + local actual_hash=$(sha256sum "$appimage_source" | awk '{print $1}') + + if [ "$expected_hash" != "$actual_hash" ]; then + msg_error "SHA256 verification failed! AppImage may be corrupted." + return 1 + fi + msg_ok "SHA256 verification passed." + else + msg_warn "SHA256 checksum not available. Skipping verification." + fi + + msg_info "Installing ProxMenux Monitor..." + mkdir -p "$MONITOR_INSTALL_DIR" + + local target_path="$MONITOR_INSTALL_DIR/ProxMenux-Monitor.AppImage" + cp "$appimage_source" "$target_path" + chmod +x "$target_path" + + msg_ok "ProxMenux Monitor v$appimage_version installed." + + if [ "$service_exists" = false ]; then + return 0 # New installation - service needs to be created + else + + systemctl start proxmenux-monitor.service + sleep 2 + + if systemctl is-active --quiet proxmenux-monitor.service; then + + update_config "proxmenux_monitor" "updated" + return 2 # Update successful + else + msg_warn "Service failed to restart. Check: journalctl -u proxmenux-monitor" + update_config "proxmenux_monitor" "failed" + return 1 + fi + fi +} + +create_monitor_service() { + msg_info "Creating ProxMenux Monitor service..." + + local exec_path="$MONITOR_INSTALL_DIR/ProxMenux-Monitor.AppImage" + + if [ -f "$TEMP_DIR/systemd/proxmenux-monitor.service" ]; then + sed "s|ExecStart=.*|ExecStart=$exec_path|g" \ + "$TEMP_DIR/systemd/proxmenux-monitor.service" > "$MONITOR_SERVICE_FILE" + msg_ok "Using service file from repository." + else + cat > "$MONITOR_SERVICE_FILE" << EOF +[Unit] +Description=ProxMenux Monitor - Web Dashboard +After=network.target + +[Service] +Type=simple +User=root +WorkingDirectory=$MONITOR_INSTALL_DIR +ExecStart=$exec_path +Restart=on-failure +RestartSec=10 +Environment="PORT=$MONITOR_PORT" + +[Install] +WantedBy=multi-user.target +EOF + msg_ok "Created default service file." + fi + + systemctl daemon-reload + systemctl enable proxmenux-monitor.service > /dev/null 2>&1 + systemctl start proxmenux-monitor.service > /dev/null 2>&1 + + sleep 3 + + if systemctl is-active --quiet proxmenux-monitor.service; then + msg_ok "ProxMenux Monitor service started successfully." + update_config "proxmenux_monitor" "installed" + return 0 + else + msg_warn "ProxMenux Monitor service failed to start." + msg_info "Check logs with: journalctl -u proxmenux-monitor -n 20" + msg_info "Check status with: systemctl status proxmenux-monitor" + update_config "proxmenux_monitor" "failed" + return 1 + fi +} + +install_normal_version() { + local total_steps=5 + local current_step=1 + + show_progress $current_step $total_steps "Installing basic dependencies." + + if ! command -v jq > /dev/null 2>&1; then + apt-get update > /dev/null 2>&1 + + if apt-get install -y jq > /dev/null 2>&1 && command -v jq > /dev/null 2>&1; then + update_config "jq" "installed" + else + local jq_url="https://github.com/jqlang/jq/releases/download/jq-1.7.1/jq-linux-amd64" + if wget -q -O /usr/local/bin/jq "$jq_url" 2>/dev/null && chmod +x /usr/local/bin/jq; then + if command -v jq > /dev/null 2>&1; then + update_config "jq" "installed_from_github" + else + msg_error "Failed to install jq. Please install it manually." + update_config "jq" "failed" + return 1 + fi + else + msg_error "Failed to install jq from both APT and GitHub. Please install it manually." + update_config "jq" "failed" + return 1 + fi + fi + else + update_config "jq" "already_installed" + fi + + BASIC_DEPS=("dialog" "curl" "git") + for pkg in "${BASIC_DEPS[@]}"; do + if ! dpkg -l | grep -qw "$pkg"; then + if apt-get install -y "$pkg" > /dev/null 2>&1; then + update_config "$pkg" "installed" + else + msg_error "Failed to install $pkg. Please install it manually." + update_config "$pkg" "failed" + return 1 + fi + else + update_config "$pkg" "already_installed" + fi + done + + msg_ok "jq, dialog, curl and git installed successfully." + + ((current_step++)) + + show_progress $current_step $total_steps "Install ProxMenux repository" + msg_info "Cloning ProxMenux repositoryy." + if ! git clone --depth 1 "$REPO_URL" "$TEMP_DIR" 2>/dev/null; then + msg_error "Failed to clone repository from $REPO_URL" + exit 1 + fi + + msg_ok "Repository cloned successfully." + + cd "$TEMP_DIR" + + ((current_step++)) + + show_progress $current_step $total_steps "Creating directories and configuration" + + mkdir -p "$BASE_DIR" + mkdir -p "$INSTALL_DIR" + + if [ ! -f "$CONFIG_FILE" ]; then + echo '{}' > "$CONFIG_FILE" + fi + + msg_ok "Directories and configuration created." + ((current_step++)) + + show_progress $current_step $total_steps "Copying necessary files" + + cp "./scripts/utils.sh" "$UTILS_FILE" + cp "./menu" "$INSTALL_DIR/$MENU_SCRIPT" + cp "./version.txt" "$LOCAL_VERSION_FILE" + cp "./install_proxmenux.sh" "$BASE_DIR/install_proxmenux.sh" + + mkdir -p "$BASE_DIR/scripts" + cp -r "./scripts/"* "$BASE_DIR/scripts/" + chmod -R +x "$BASE_DIR/scripts/" + chmod +x "$BASE_DIR/install_proxmenux.sh" + msg_ok "Necessary files created." + + chmod +x "$INSTALL_DIR/$MENU_SCRIPT" + + ((current_step++)) + show_progress $current_step $total_steps "Installing ProxMenux Monitor" + + install_proxmenux_monitor + local monitor_status=$? + + if [ $monitor_status -eq 0 ]; then + create_monitor_service + fi + + msg_ok "ProxMenux Normal Version installation completed successfully." +} + +install_translation_version() { + local total_steps=5 + local current_step=1 + + show_progress $current_step $total_steps "Language selection" + select_language + ((current_step++)) + + show_progress $current_step $total_steps "Installing system dependencies" + + if ! command -v jq > /dev/null 2>&1; then + apt-get update > /dev/null 2>&1 + + if apt-get install -y jq > /dev/null 2>&1 && command -v jq > /dev/null 2>&1; then + update_config "jq" "installed" + else + local jq_url="https://github.com/jqlang/jq/releases/download/jq-1.7.1/jq-linux-amd64" + if wget -q -O /usr/local/bin/jq "$jq_url" 2>/dev/null && chmod +x /usr/local/bin/jq; then + if command -v jq > /dev/null 2>&1; then + update_config "jq" "installed_from_github" + else + msg_error "Failed to install jq. Please install it manually." + update_config "jq" "failed" + return 1 + fi + else + msg_error "Failed to install jq from both APT and GitHub. Please install it manually." + update_config "jq" "failed" + return 1 + fi + fi + else + update_config "jq" "already_installed" + fi + + DEPS=("dialog" "curl" "git" "python3" "python3-venv" "python3-pip") + for pkg in "${DEPS[@]}"; do + if ! dpkg -l | grep -qw "$pkg"; then + if apt-get install -y "$pkg" > /dev/null 2>&1; then + update_config "$pkg" "installed" + else + msg_error "Failed to install $pkg. Please install it manually." + update_config "$pkg" "failed" + return 1 + fi + else + update_config "$pkg" "already_installed" + fi + done + + msg_ok "jq, dialog, curl, git, python3, python3-venv and python3-pip installed successfully." + + ((current_step++)) + + show_progress $current_step $total_steps "Setting up translation environment" + + if [ ! -d "$VENV_PATH" ] || [ ! -f "$VENV_PATH/bin/activate" ]; then + python3 -m venv --system-site-packages "$VENV_PATH" > /dev/null 2>&1 + if [ ! -f "$VENV_PATH/bin/activate" ]; then + msg_error "Failed to create virtual environment. Please check your Python installation." + update_config "virtual_environment" "failed" + return 1 + else + update_config "virtual_environment" "created" + fi + else + update_config "virtual_environment" "already_exists" + fi + + source "$VENV_PATH/bin/activate" + + if pip install --upgrade pip > /dev/null 2>&1; then + update_config "pip" "upgraded" + else + msg_error "Failed to upgrade pip." + update_config "pip" "upgrade_failed" + return 1 + fi + + if pip install --break-system-packages --no-cache-dir googletrans==4.0.0-rc1 > /dev/null 2>&1; then + update_config "googletrans" "installed" + else + msg_error "Failed to install googletrans. Please check your internet connection." + update_config "googletrans" "failed" + deactivate + return 1 + fi + + deactivate + + show_progress $current_step $total_steps "Cloning ProxMenux repository" + if ! git clone --depth 1 "$REPO_URL" "$TEMP_DIR" 2>/dev/null; then + msg_error "Failed to clone repository from $REPO_URL" + exit 1 + fi + msg_ok "Repository cloned successfully." + + cd "$TEMP_DIR" + + ((current_step++)) + + show_progress $current_step $total_steps "Copying necessary files" + + mkdir -p "$BASE_DIR" + mkdir -p "$INSTALL_DIR" + + cp "./json/cache.json" "$CACHE_FILE" + msg_ok "Cache file copied with translations." + + cp "./scripts/utils.sh" "$UTILS_FILE" + cp "./menu" "$INSTALL_DIR/$MENU_SCRIPT" + cp "./version.txt" "$LOCAL_VERSION_FILE" + cp "./install_proxmenux.sh" "$BASE_DIR/install_proxmenux.sh" + + mkdir -p "$BASE_DIR/scripts" + cp -r "./scripts/"* "$BASE_DIR/scripts/" + chmod -R +x "$BASE_DIR/scripts/" + chmod +x "$BASE_DIR/install_proxmenux.sh" + msg_ok "Necessary files created." + + chmod +x "$INSTALL_DIR/$MENU_SCRIPT" + + ((current_step++)) + show_progress $current_step $total_steps "Installing ProxMenux Monitor" + + install_proxmenux_monitor + local monitor_status=$? + + if [ $monitor_status -eq 0 ]; then + create_monitor_service + elif [ $monitor_status -eq 2 ]; then + msg_ok "ProxMenux Monitor updated successfully." + fi + + msg_ok "ProxMenux Translation Version installation completed successfully." +} + +show_installation_options() { + local current_install_type + current_install_type=$(check_existing_installation) + local pve_version + pve_version=$(pveversion 2>/dev/null | grep -oP 'pve-manager/\K[0-9]+' | head -1) + + local menu_title="ProxMenux Installation" + local menu_text="Choose installation type:" + + if [ "$current_install_type" != "none" ]; then + case "$current_install_type" in + "translation") + menu_title="ProxMenux Update - Translation Version Detected" + ;; + "normal") + menu_title="ProxMenux Update - Normal Version Detected" + ;; + "unknown") + menu_title="ProxMenux Update - Existing Installation Detected" + ;; + esac + fi + + if [[ "$pve_version" -ge 9 ]]; then + INSTALL_TYPE=$(whiptail --backtitle "ProxMenux" --title "$menu_title" --menu "\n$menu_text" 14 70 2 \ + "1" "Normal Version (English only)" 3>&1 1>&2 2>&3) + + if [ -z "$INSTALL_TYPE" ]; then + show_proxmenux_logo + msg_warn "Installation cancelled." + exit 1 + fi + else + INSTALL_TYPE=$(whiptail --backtitle "ProxMenux" --title "$menu_title" --menu "\n$menu_text" 14 70 2 \ + "1" "Normal Version (English only)" \ + "2" "Translation Version (Multi-language support)" 3>&1 1>&2 2>&3) + + if [ -z "$INSTALL_TYPE" ]; then + show_proxmenux_logo + msg_warn "Installation cancelled." + exit 1 + fi + fi + + if [ -z "$INSTALL_TYPE" ]; then + show_proxmenux_logo + msg_warn "Installation cancelled." + exit 1 + fi + + if [ "$current_install_type" = "none" ]; then + if ! show_installation_confirmation "$INSTALL_TYPE"; then + show_proxmenux_logo + msg_warn "Installation cancelled." + exit 1 + fi + fi + + if ! handle_installation_change "$current_install_type" "$INSTALL_TYPE"; then + show_proxmenux_logo + msg_warn "Installation cancelled." + exit 1 + fi +} + +install_proxmenux() { + show_installation_options + + case "$INSTALL_TYPE" in + "1") + show_proxmenux_logo + msg_title "Installing ProxMenux - Normal Version" + install_normal_version + ;; + "2") + show_proxmenux_logo + msg_title "Installing ProxMenux - Translation Version" + install_translation_version + ;; + *) + msg_error "Invalid option selected." + exit 1 + ;; + esac + + if [[ -f "$UTILS_FILE" ]]; then + source "$UTILS_FILE" + fi + + msg_title "ProxMenux has been installed successfully" + + if systemctl is-active --quiet proxmenux-monitor.service; then + local server_ip=$(get_server_ip) + echo -e "${GN}🌐 ProxMenux Monitor activated${CL}: ${BL}http://${server_ip}:${MONITOR_PORT}${CL}" + echo + fi + + echo -ne "${GN}" + type_text "To run ProxMenux, simply execute this command in the console or terminal:" + echo -e "${YWB} menu${CL}" + echo +} + +if [ "$(id -u)" -ne 0 ]; then + msg_error "This script must be run as root." + exit 1 +fi + +cleanup_corrupted_files +install_proxmenux From 2e8e2b61d394c72cf06cc650e67ef3516212e43e Mon Sep 17 00:00:00 2001 From: cod378 Date: Fri, 14 Nov 2025 02:30:19 +0000 Subject: [PATCH 112/114] fix: use MONITOR_SERVICE constant instead of MONITOR_SERVICE_NAME in uninstall function --- scripts/menus/config_menu.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/scripts/menus/config_menu.sh b/scripts/menus/config_menu.sh index a2491c2..6f6ff1e 100644 --- a/scripts/menus/config_menu.sh +++ b/scripts/menus/config_menu.sh @@ -36,17 +36,17 @@ initialize_cache uninstall_proxmenux_monitor() { # 1. Stop service if it is running - if systemctl is-active --quiet "${MONITOR_SERVICE_NAME}"; then + if systemctl is-active --quiet "${MONITOR_SERVICE}"; then echo " - Stoping service..." - systemctl stop "${MONITOR_SERVICE_NAME}" + systemctl stop "${MONITOR_SERVICE}" else echo " - Service is not running (ok)" fi # 2. Disable service if enabled - if systemctl is-enabled --quiet "${MONITOR_SERVICE_NAME}"; then + if systemctl is-enabled --quiet "${MONITOR_SERVICE}"; then echo " - Disabling service..." - systemctl disable "${MONITOR_SERVICE_NAME}" + systemctl disable "${MONITOR_SERVICE}" else echo " - Service is not enabled (ok)" fi @@ -64,7 +64,7 @@ uninstall_proxmenux_monitor() { systemctl daemon-reload systemctl reset-failed || true - echo "==> Service ${MONITOR_SERVICE_NAME} uninstalled." + echo "==> Service ${MONITOR_SERVICE} uninstalled." } From c1d00e21dbf9615038b7b9e13ba684cb89e1556a Mon Sep 17 00:00:00 2001 From: cod378 Date: Fri, 14 Nov 2025 02:37:43 +0000 Subject: [PATCH 113/114] fix: suppress systemctl output in ProxMenux Monitor uninstaller - Redirect stdout and stderr to /dev/null for stop, disable, daemon-reload, and reset-failed commands - Maintain clean console output during uninstallation process --- scripts/menus/config_menu.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/menus/config_menu.sh b/scripts/menus/config_menu.sh index 6f6ff1e..76d99cc 100644 --- a/scripts/menus/config_menu.sh +++ b/scripts/menus/config_menu.sh @@ -38,7 +38,7 @@ uninstall_proxmenux_monitor() { # 1. Stop service if it is running if systemctl is-active --quiet "${MONITOR_SERVICE}"; then echo " - Stoping service..." - systemctl stop "${MONITOR_SERVICE}" + systemctl stop "${MONITOR_SERVICE}" > /dev/null 2>&1 else echo " - Service is not running (ok)" fi @@ -46,7 +46,7 @@ uninstall_proxmenux_monitor() { # 2. Disable service if enabled if systemctl is-enabled --quiet "${MONITOR_SERVICE}"; then echo " - Disabling service..." - systemctl disable "${MONITOR_SERVICE}" + systemctl disable "${MONITOR_SERVICE}" > /dev/null 2>&1 else echo " - Service is not enabled (ok)" fi @@ -61,8 +61,8 @@ uninstall_proxmenux_monitor() { # 4. Reload systemd echo " - Recargando systemd..." - systemctl daemon-reload - systemctl reset-failed || true + systemctl daemon-reload > /dev/null 2>&1 + systemctl reset-failed > /dev/null 2>&1 || true echo "==> Service ${MONITOR_SERVICE} uninstalled." From 616b772a45c9d3393a40ca7b9e40d0e5c4caa93f Mon Sep 17 00:00:00 2001 From: cod378 Date: Fri, 14 Nov 2025 02:40:48 +0000 Subject: [PATCH 114/114] chore: remove test installer script - Delete install_proxmenux_test.sh (1048 lines) - Test installer no longer needed after validation --- install_proxmenux_test.sh | 1048 ------------------------------------- 1 file changed, 1048 deletions(-) delete mode 100755 install_proxmenux_test.sh diff --git a/install_proxmenux_test.sh b/install_proxmenux_test.sh deleted file mode 100755 index 61562ab..0000000 --- a/install_proxmenux_test.sh +++ /dev/null @@ -1,1048 +0,0 @@ -#!/bin/bash - -# ========================================================== -# ProxMenux - A menu-driven toolkit for Proxmox VE management -# ========================================================== -# Author : MacRimi -# Contributors : cod378 -# Subproject : ProxMenux Monitor (System Health & Web Dashboard) -# Copyright : (c) 2024-2025 MacRimi -# License : (CC BY-NC 4.0) (https://github.com/MacRimi/ProxMenux/blob/main/LICENSE) -# Version : 1.4 -# Last Updated : 12/11/2025 -# ========================================================== -# Description: -# This script installs and configures ProxMenux, a menu-driven -# toolkit for managing and optimizing Proxmox VE servers. -# -# - Ensures the script is run with root privileges. -# - Displays an installation confirmation prompt. -# - Installs required dependencies: -# • whiptail (interactive terminal menus) -# • curl (downloads and connectivity checks) -# • jq (JSON parsing) -# • Python 3 + venv (for translation support) -# - Creates the ProxMenux base directories and configuration files: -# • $BASE_DIR/config.json -# • $BASE_DIR/cache.json -# - Copies local project files into the target paths (offline mode by default): -# • scripts/* → $BASE_DIR/scripts/ -# • utils.sh → $BASE_DIR/scripts/utils.sh -# • menu → $INSTALL_DIR/menu (main launcher) -# • install_proxmenux.sh → $BASE_DIR/install_proxmenux.sh -# - Sets correct permissions for all executables. -# - Displays the final instruction on how to start ProxMenux ("menu"). -# -# Notes: -# - This installer supports both offline and online setups. -# - ProxMenux Monitor can be installed later as an optional module -# to provide real-time system monitoring and a web dashboard. -# ========================================================== - -# Configuration ============================================ -LOCAL_SCRIPTS="/usr/local/share/proxmenux/scripts" -INSTALL_DIR="/usr/local/bin" -BASE_DIR="/usr/local/share/proxmenux" -CONFIG_FILE="$BASE_DIR/config.json" -CACHE_FILE="$BASE_DIR/cache.json" -UTILS_FILE="$BASE_DIR/utils.sh" -LOCAL_VERSION_FILE="$BASE_DIR/version.txt" -MENU_SCRIPT="menu" -VENV_PATH="/opt/googletrans-env" - -MONITOR_INSTALL_DIR="$BASE_DIR/monitor" -MONITOR_SERVICE_FILE="/etc/systemd/system/proxmenux-monitor.service" -MONITOR_PORT=8008 - -# Offline installer envs -REPO_URL="https://github.com/c78-contrib/ProxMenuxOffline.git" -TEMP_DIR="/tmp/proxmenux-install-$$" - -# Load utility functions -NEON_PURPLE_BLUE="\033[38;5;99m" -WHITE="\033[38;5;15m" -RESET="\033[0m" -DARK_GRAY="\033[38;5;244m" -ORANGE="\033[38;5;208m" -YW="\033[33m" -YWB="\033[1;33m" -GN="\033[1;92m" -RD="\033[01;31m" -CL="\033[m" -BL="\033[36m" -DGN="\e[32m" -BGN="\e[1;32m" -DEF="\e[1;36m" -CUS="\e[38;5;214m" -BOLD="\033[1m" -BFR="\\r\\033[K" -HOLD="-" -BOR=" | " -CM="${GN}✓ ${CL}" -TAB=" " - - -# Create and display spinner -spinner() { - local frames=('⠋' '⠙' '⠹' '⠸' '⠼' '⠴' '⠦' '⠧' '⠇' '⠏') - local spin_i=0 - local interval=0.1 - printf "\e[?25l" - - local color="${YW}" - - while true; do - printf "\r ${color}%s${CL}" "${frames[spin_i]}" - spin_i=$(( (spin_i + 1) % ${#frames[@]} )) - sleep "$interval" - done -} - - -# Function to simulate typing effect -type_text() { - local text="$1" - local delay=0.05 - for ((i=0; i<${#text}; i++)); do - echo -n "${text:$i:1}" - sleep $delay - done - echo -} - - -# Display info message with spinner -msg_info() { - local msg="$1" - echo -ne "${TAB}${YW}${HOLD}${msg}" - spinner & - SPINNER_PID=$! -} - - -# Display info2 message -msg_info2() { - local msg="$1" - echo -e "${TAB}${BOLD}${YW}${HOLD}${msg}${CL}" -} - - - -# Display title script -msg_title() { - local msg="$1" - echo -e "\n" - echo -e "${TAB}${BOLD}${HOLD}${BOR}${msg}${BOR}${HOLD}${CL}" - echo -e "\n" -} - - -# Display warning or highlighted information message -msg_warn() { - if [ -n "$SPINNER_PID" ] && ps -p $SPINNER_PID > /dev/null; then - kill $SPINNER_PID > /dev/null - fi - printf "\e[?25h" - local msg="$1" - echo -e "${BFR}${TAB}${CL} ${YWB}${msg}${CL}" -} - - -# Display success message -msg_ok() { - if [ -n "$SPINNER_PID" ] && ps -p $SPINNER_PID > /dev/null; then - kill $SPINNER_PID > /dev/null - fi - printf "\e[?25h" - local msg="$1" - echo -e "${BFR}${TAB}${CM}${GN}${msg}${CL}" -} - - -# Display error message -msg_error() { - if [ -n "$SPINNER_PID" ] && ps -p $SPINNER_PID > /dev/null; then - kill $SPINNER_PID > /dev/null - fi - printf "\e[?25h" - local msg="$1" - echo -e "${BFR}${TAB}${RD}[ERROR] ${msg}${CL}" -} - - - - -show_proxmenux_logo() { -clear - -if [[ -z "$SSH_TTY" && -z "$(who am i | awk '{print $NF}' | grep -E '([0-9]{1,3}\.){3}[0-9]{1,3}')" ]]; then - -# Logo for terminal noVNC - -LOGO=$(cat << "EOF" -\e[0m\e[38;2;61;61;61m▆\e[38;2;60;60;60m▄\e[38;2;54;54;54m▂\e[0m \e[38;2;0;0;0m \e[0m \e[38;2;54;54;54m▂\e[38;2;60;60;60m▄\e[38;2;61;61;61m▆\e[0m -\e[38;2;59;59;59;48;2;62;62;62m▏ \e[38;2;61;61;61;48;2;37;37;37m▇\e[0m\e[38;2;60;60;60m▅\e[38;2;56;56;56m▃\e[38;2;37;37;37m▁ \e[38;2;36;36;36m▁\e[38;2;56;56;56m▃\e[38;2;60;60;60m▅\e[38;2;61;61;61;48;2;37;37;37m▇\e[48;2;62;62;62m \e[0m\e[7m\e[38;2;60;60;60m▁\e[0m -\e[38;2;59;59;59;48;2;62;62;62m▏ \e[0m\e[7m\e[38;2;61;61;61m▂\e[0m\e[38;2;62;62;62;48;2;61;61;61m┈\e[48;2;62;62;62m \e[48;2;61;61;61m┈\e[0m\e[38;2;60;60;60m▆\e[38;2;57;57;57m▄\e[38;2;48;48;48m▂\e[0m \e[38;2;47;47;47m▂\e[38;2;57;57;57m▄\e[38;2;60;60;60m▆\e[38;2;62;62;62;48;2;61;61;61m┈\e[48;2;62;62;62m \e[48;2;61;61;61m┈\e[0m\e[7m\e[38;2;60;60;60m▂\e[38;2;57;57;57m▄\e[38;2;47;47;47m▆\e[0m \e[0m -\e[38;2;59;59;59;48;2;62;62;62m▏ \e[0m\e[38;2;32;32;32m▏\e[7m\e[38;2;39;39;39m▇\e[38;2;57;57;57m▅\e[38;2;60;60;60m▃\e[0m\e[38;2;40;40;40;48;2;61;61;61m▁\e[48;2;62;62;62m \e[38;2;54;54;54;48;2;61;61;61m┊\e[48;2;62;62;62m \e[38;2;39;39;39;48;2;61;61;61m▁\e[0m\e[7m\e[38;2;60;60;60m▃\e[38;2;57;57;57m▅\e[38;2;38;38;38m▇\e[0m \e[38;2;193;60;2m▃\e[38;2;217;67;2m▅\e[38;2;225;70;2m▇\e[0m -\e[38;2;59;59;59;48;2;62;62;62m▏ \e[0m\e[38;2;32;32;32m▏\e[0m \e[38;2;203;63;2m▄\e[38;2;147;45;1m▂\e[0m \e[7m\e[38;2;55;55;55m▆\e[38;2;60;60;60m▄\e[38;2;61;61;61m▂\e[38;2;60;60;60m▄\e[38;2;55;55;55m▆\e[0m \e[38;2;144;44;1m▂\e[38;2;202;62;2m▄\e[38;2;219;68;2m▆\e[38;2;231;72;3;48;2;226;70;2m┈\e[48;2;231;72;3m \e[48;2;225;70;2m▉\e[0m -\e[38;2;59;59;59;48;2;62;62;62m▏ \e[0m\e[38;2;32;32;32m▏\e[7m\e[38;2;121;37;1m▉\e[0m\e[38;2;0;0;0;48;2;231;72;3m \e[0m\e[38;2;221;68;2m▇\e[38;2;208;64;2m▅\e[38;2;212;66;2m▂\e[38;2;123;37;0m▁\e[38;2;211;65;2m▂\e[38;2;207;64;2m▅\e[38;2;220;68;2m▇\e[48;2;231;72;3m \e[38;2;231;72;3;48;2;225;70;2m┈\e[0m\e[7m\e[38;2;221;68;2m▂\e[0m\e[38;2;44;13;0;48;2;231;72;3m \e[38;2;231;72;3;48;2;225;70;2m▉\e[0m -\e[38;2;59;59;59;48;2;62;62;62m▏ \e[0m\e[38;2;32;32;32m▏\e[0m \e[7m\e[38;2;190;59;2m▅\e[38;2;216;67;2m▃\e[38;2;225;70;2m▁\e[0m\e[38;2;95;29;0;48;2;231;72;3m \e[38;2;231;72;3;48;2;230;71;2m┈\e[48;2;231;72;3m \e[0m\e[7m\e[38;2;225;70;2m▁\e[38;2;216;67;2m▃\e[38;2;191;59;2m▅\e[0m \e[38;2;0;0;0;48;2;231;72;3m \e[38;2;231;72;3;48;2;225;70;2m▉\e[0m -\e[38;2;59;59;59;48;2;62;62;62m▏ \e[0m\e[38;2;32;32;32m▏ \e[0m \e[7m\e[38;2;172;53;1m▆\e[38;2;213;66;2m▄\e[38;2;219;68;2m▂\e[38;2;213;66;2m▄\e[38;2;174;54;2m▆\e[0m \e[38;2;0;0;0m \e[0m \e[38;2;0;0;0;48;2;231;72;3m \e[38;2;231;72;3;48;2;225;70;2m▉\e[0m -\e[38;2;59;59;59;48;2;62;62;62m▏ \e[0m\e[38;2;32;32;32m▏ \e[0m \e[38;2;0;0;0;48;2;231;72;3m \e[38;2;231;72;3;48;2;225;70;2m▉\e[0m -\e[7m\e[38;2;52;52;52m▆\e[38;2;59;59;59m▄\e[38;2;61;61;61m▂\e[0m\e[38;2;31;31;31m▏ \e[0m \e[7m\e[38;2;228;71;2m▂\e[38;2;221;69;2m▄\e[38;2;196;60;2m▆\e[0m -EOF -) - - -TEXT=( - "" - "" - "${BOLD}ProxMenux${RESET}" - "" - "${BOLD}${NEON_PURPLE_BLUE}An Interactive Menu for${RESET}" - "${BOLD}${NEON_PURPLE_BLUE}Proxmox VE management${RESET}" - "" - "" - "" - "" -) - - -mapfile -t logo_lines <<< "$LOGO" - -for i in {0..9}; do - echo -e "${TAB}${logo_lines[i]} ${WHITE}│${RESET} ${TEXT[i]}" -done -echo -e - -else - - -# Logo for terminal SSH -TEXT=( - "" - "" - "" - "" - "${BOLD}ProxMenux${RESET}" - "" - "${BOLD}${NEON_PURPLE_BLUE}An Interactive Menu for${RESET}" - "${BOLD}${NEON_PURPLE_BLUE}Proxmox VE management${RESET}" - "" - "" - "" - "" - "" - "" -) - -LOGO=( - "${DARK_GRAY}░░░░ ░░░░${RESET}" - "${DARK_GRAY}░░░░░░░ ░░░░░░ ${RESET}" - "${DARK_GRAY}░░░░░░░░░░░ ░░░░░░░ ${RESET}" - "${DARK_GRAY}░░░░ ░░░░░░ ░░░░░░ ${ORANGE}░░${RESET}" - "${DARK_GRAY}░░░░ ░░░░░░░ ${ORANGE}░░▒▒▒${RESET}" - "${DARK_GRAY}░░░░ ░░░ ${ORANGE}░▒▒▒▒▒▒▒${RESET}" - "${DARK_GRAY}░░░░ ${ORANGE}▒▒▒░ ░▒▒▒▒▒▒▒▒▒▒${RESET}" - "${DARK_GRAY}░░░░ ${ORANGE}░▒▒▒▒▒ ▒▒▒▒▒░░ ▒▒▒▒${RESET}" - "${DARK_GRAY}░░░░ ${ORANGE}░░▒▒▒▒▒▒▒░░ ▒▒▒▒${RESET}" - "${DARK_GRAY}░░░░ ${ORANGE}░░░ ▒▒▒▒${RESET}" - "${DARK_GRAY}░░░░ ${ORANGE}▒▒▒▒${RESET}" - "${DARK_GRAY}░░░░ ${ORANGE}▒▒▒░${RESET}" - "${DARK_GRAY} ░░ ${ORANGE}░░ ${RESET}" -) - -for i in {0..12}; do - echo -e "${TAB}${LOGO[i]} │${RESET} ${TEXT[i]}" -done -echo -e -fi - -} - -# ========================================================== - - - - - -cleanup_corrupted_files() { - if [ -f "$CONFIG_FILE" ] && ! jq empty "$CONFIG_FILE" >/dev/null 2>&1; then - echo "Cleaning up corrupted configuration file..." - rm -f "$CONFIG_FILE" - fi - if [ -f "$CACHE_FILE" ] && ! jq empty "$CACHE_FILE" >/dev/null 2>&1; then - echo "Cleaning up corrupted cache file..." - rm -f "$CACHE_FILE" - fi -} - -# Cleanup function -cleanup() { - if [ -d "$TEMP_DIR" ]; then - rm -rf "$TEMP_DIR" - fi -} - -# Set trap to ensure cleanup on exit -trap cleanup EXIT - - -# ========================================================== -check_existing_installation() { - local has_venv=false - local has_config=false - local has_language=false - local has_menu=false - - if [ -f "$INSTALL_DIR/$MENU_SCRIPT" ]; then - has_menu=true - fi - - if [ -d "$VENV_PATH" ] && [ -f "$VENV_PATH/bin/activate" ]; then - has_venv=true - fi - - if [ -f "$CONFIG_FILE" ]; then - if jq empty "$CONFIG_FILE" >/dev/null 2>&1; then - has_config=true - local current_language=$(jq -r '.language // empty' "$CONFIG_FILE" 2>/dev/null) - if [[ -n "$current_language" && "$current_language" != "null" && "$current_language" != "empty" ]]; then - has_language=true - fi - else - echo "Warning: Corrupted config file detected, removing..." - rm -f "$CONFIG_FILE" - fi - fi - - if [ "$has_venv" = true ] && [ "$has_language" = true ]; then - echo "translation" - elif [ "$has_menu" = true ] && [ "$has_venv" = false ]; then - echo "normal" - elif [ "$has_menu" = true ]; then - echo "unknown" - else - echo "none" - fi -} - -uninstall_proxmenux() { - local install_type="$1" - local force_clean="$2" - - if [ "$force_clean" != "force" ]; then - if ! whiptail --title "Uninstall ProxMenux" --yesno "Are you sure you want to uninstall ProxMenux?" 10 60; then - return 1 - fi - fi - - echo "Uninstalling ProxMenux..." - - if systemctl is-active --quiet proxmenux-monitor.service; then - echo "Stopping ProxMenux Monitor service..." - systemctl stop proxmenux-monitor.service - fi - - if systemctl is-enabled --quiet proxmenux-monitor.service 2>/dev/null; then - echo "Disabling ProxMenux Monitor service..." - systemctl disable proxmenux-monitor.service - fi - - if [ -f "$MONITOR_SERVICE_FILE" ]; then - echo "Removing ProxMenux Monitor service file..." - rm -f "$MONITOR_SERVICE_FILE" - systemctl daemon-reload - fi - - if [ -d "$MONITOR_INSTALL_DIR" ]; then - echo "Removing ProxMenux Monitor directory..." - rm -rf "$MONITOR_INSTALL_DIR" - fi - - if [ -f "$VENV_PATH/bin/activate" ]; then - echo "Removing googletrans and virtual environment..." - source "$VENV_PATH/bin/activate" - pip uninstall -y googletrans >/dev/null 2>&1 - deactivate - rm -rf "$VENV_PATH" - fi - - if [ "$install_type" = "translation" ] && [ "$force_clean" != "force" ]; then - DEPS_TO_REMOVE=$(whiptail --title "Remove Translation Dependencies" --checklist \ - "Select translation-specific dependencies to remove:" 15 60 3 \ - "python3-venv" "Python virtual environment" OFF \ - "python3-pip" "Python package installer" OFF \ - "python3" "Python interpreter" OFF \ - 3>&1 1>&2 2>&3) - - if [ -n "$DEPS_TO_REMOVE" ]; then - echo "Removing selected dependencies..." - read -r -a DEPS_ARRAY <<< "$(echo "$DEPS_TO_REMOVE" | tr -d '"')" - for dep in "${DEPS_ARRAY[@]}"; do - echo "Removing $dep..." - apt-mark auto "$dep" >/dev/null 2>&1 - apt-get -y --purge autoremove "$dep" >/dev/null 2>&1 - done - apt-get autoremove -y --purge >/dev/null 2>&1 - fi - fi - - rm -f "$INSTALL_DIR/$MENU_SCRIPT" - rm -rf "$BASE_DIR" - - [ -f /root/.bashrc.bak ] && mv /root/.bashrc.bak /root/.bashrc - if [ -f /etc/motd.bak ]; then - mv /etc/motd.bak /etc/motd - else - sed -i '/This system is optimised by: ProxMenux/d' /etc/motd - fi - - echo "ProxMenux has been uninstalled." - return 0 -} - -handle_installation_change() { - local current_type="$1" - local new_type="$2" - - if [ "$current_type" = "$new_type" ]; then - return 0 - fi - - case "$current_type-$new_type" in - "translation-1"|"translation-normal") - if whiptail --title "Installation Type Change" \ - --yesno "Switch from Translation to Normal Version?\n\nThis will remove translation components." 10 60; then - echo "Preparing for installation type change..." - uninstall_proxmenux "translation" "force" >/dev/null 2>&1 - return 0 - else - return 1 - fi - ;; - "normal-2"|"normal-translation") - if whiptail --title "Installation Type Change" \ - --yesno "Switch from Normal to Translation Version?\n\nThis will add translation components." 10 60; then - return 0 - else - return 1 - fi - ;; - *) - return 0 - ;; - esac -} - -update_config() { - local component="$1" - local status="$2" - local timestamp=$(date -u +"%Y-%m-%dT%H:%M:%SZ") - - local tracked_components=("dialog" "curl" "jq" "python3" "python3-venv" "python3-pip" "virtual_environment" "pip" "googletrans" "proxmenux_monitor") - - if [[ " ${tracked_components[@]} " =~ " ${component} " ]]; then - mkdir -p "$(dirname "$CONFIG_FILE")" - - if [ ! -f "$CONFIG_FILE" ] || ! jq empty "$CONFIG_FILE" >/dev/null 2>&1; then - echo '{}' > "$CONFIG_FILE" - fi - - local tmp_file=$(mktemp) - if jq --arg comp "$component" --arg stat "$status" --arg time "$timestamp" \ - '.[$comp] = {status: $stat, timestamp: $time}' "$CONFIG_FILE" > "$tmp_file" 2>/dev/null; then - mv "$tmp_file" "$CONFIG_FILE" - else - echo '{}' > "$CONFIG_FILE" - jq --arg comp "$component" --arg stat "$status" --arg time "$timestamp" \ - '.[$comp] = {status: $stat, timestamp: $time}' "$CONFIG_FILE" > "$tmp_file" && mv "$tmp_file" "$CONFIG_FILE" - fi - - [ -f "$tmp_file" ] && rm -f "$tmp_file" - fi -} - -show_progress() { - local step="$1" - local total="$2" - local message="$3" - - echo -e "\n${BOLD}${BL}${TAB}Installing ProxMenux: Step $step of $total${CL}" - echo - msg_info2 "$message" -} - -select_language() { - if [ -f "$CONFIG_FILE" ] && jq empty "$CONFIG_FILE" >/dev/null 2>&1; then - local existing_language=$(jq -r '.language // empty' "$CONFIG_FILE" 2>/dev/null) - if [[ -n "$existing_language" && "$existing_language" != "null" && "$existing_language" != "empty" ]]; then - LANGUAGE="$existing_language" - msg_ok "Using existing language configuration: $LANGUAGE" - return 0 - fi - fi - - LANGUAGE=$(whiptail --title "Select Language" --menu "Choose a language for the menu:" 20 60 12 \ - "en" "English (Recommended)" \ - "es" "Spanish" \ - "fr" "French" \ - "de" "German" \ - "it" "Italian" \ - "pt" "Portuguese" 3>&1 1>&2 2>&3) - - if [ -z "$LANGUAGE" ]; then - msg_error "No language selected. Exiting." - exit 1 - fi - - mkdir -p "$(dirname "$CONFIG_FILE")" - - if [ ! -f "$CONFIG_FILE" ] || ! jq empty "$CONFIG_FILE" >/dev/null 2>&1; then - echo '{}' > "$CONFIG_FILE" - fi - - local tmp_file=$(mktemp) - if jq --arg lang "$LANGUAGE" '. + {language: $lang}' "$CONFIG_FILE" > "$tmp_file" 2>/dev/null; then - mv "$tmp_file" "$CONFIG_FILE" - else - echo "{\"language\": \"$LANGUAGE\"}" > "$CONFIG_FILE" - fi - - [ -f "$tmp_file" ] && rm -f "$tmp_file" - - msg_ok "Language set to: $LANGUAGE" -} - -# Show installation confirmation for new installations -show_installation_confirmation() { - local install_type="$1" - - case "$install_type" in - "1") - if whiptail --title "ProxMenux - Normal Version Installation" \ - --yesno "ProxMenux Normal Version will install:\n\n• dialog (interactive menus) - Official Debian package\n• curl (file downloads) - Official Debian package\n• jq (JSON processing) - Official Debian package\n• ProxMenux core files (/usr/local/share/proxmenux)\n• ProxMenux Monitor (Web dashboard on port 8008)\n\nThis is a lightweight installation with minimal dependencies.\n\nProceed with installation?" 20 70; then - return 0 - else - return 1 - fi - ;; - "2") - if whiptail --title "ProxMenux - Translation Version Installation" \ - --yesno "ProxMenux Translation Version will install:\n\n• dialog (interactive menus)\n• curl (file downloads)\n• jq (JSON processing)\n• python3 + python3-venv + python3-pip\n• Google Translate library (googletrans)\n• Virtual environment (/opt/googletrans-env)\n• Translation cache system\n• ProxMenux core files\n• ProxMenux Monitor (Web dashboard on port 8008)\n\nThis version requires more dependencies for translation support.\n\nProceed with installation?" 20 70; then - return 0 - else - return 1 - fi - ;; - esac -} - -get_server_ip() { - local ip - # Try to get the primary IP address - ip=$(ip route get 1.1.1.1 2>/dev/null | grep -oP 'src \K\S+') - - if [ -z "$ip" ]; then - # Fallback: get first non-loopback IP - ip=$(hostname -I | awk '{print $1}') - fi - - if [ -z "$ip" ]; then - # Last resort: use localhost - ip="localhost" - fi - - echo "$ip" -} - -detect_latest_appimage() { - local appimage_dir="$TEMP_DIR/AppImage" - - if [ ! -d "$appimage_dir" ]; then - return 1 - fi - - local latest_appimage=$(find "$appimage_dir" -name "ProxMenux-*.AppImage" -type f | sort -V | tail -1) - - if [ -z "$latest_appimage" ]; then - return 1 - fi - - echo "$latest_appimage" - return 0 -} - -get_appimage_version() { - local appimage_path="$1" - local filename=$(basename "$appimage_path") - - local version=$(echo "$filename" | grep -oP 'ProxMenux-\K[0-9]+\.[0-9]+\.[0-9]+') - - echo "$version" -} - -install_proxmenux_monitor() { - local appimage_source=$(detect_latest_appimage) - - if [ -z "$appimage_source" ] || [ ! -f "$appimage_source" ]; then - msg_error "ProxMenux Monitor AppImage not found in $TEMP_DIR/AppImage/" - msg_warn "Please ensure the AppImage directory exists with ProxMenux-*.AppImage files." - update_config "proxmenux_monitor" "appimage_not_found" - return 1 - fi - - local appimage_version=$(get_appimage_version "$appimage_source") - - if systemctl is-active --quiet proxmenux-monitor.service; then - systemctl stop proxmenux-monitor.service - fi - - local service_exists=false - if [ -f "$MONITOR_SERVICE_FILE" ]; then - service_exists=true - fi - - local sha256_file="$TEMP_DIR/AppImage/ProxMenux-Monitor.AppImage.sha256" - - if [ -f "$sha256_file" ]; then - msg_info "Verifying AppImage integrity..." - local expected_hash=$(cat "$sha256_file" | grep -Eo '^[a-f0-9]+' | tr -d '\n') - local actual_hash=$(sha256sum "$appimage_source" | awk '{print $1}') - - if [ "$expected_hash" != "$actual_hash" ]; then - msg_error "SHA256 verification failed! AppImage may be corrupted." - return 1 - fi - msg_ok "SHA256 verification passed." - else - msg_warn "SHA256 checksum not available. Skipping verification." - fi - - msg_info "Installing ProxMenux Monitor..." - mkdir -p "$MONITOR_INSTALL_DIR" - - local target_path="$MONITOR_INSTALL_DIR/ProxMenux-Monitor.AppImage" - cp "$appimage_source" "$target_path" - chmod +x "$target_path" - - msg_ok "ProxMenux Monitor v$appimage_version installed." - - if [ "$service_exists" = false ]; then - return 0 # New installation - service needs to be created - else - - systemctl start proxmenux-monitor.service - sleep 2 - - if systemctl is-active --quiet proxmenux-monitor.service; then - - update_config "proxmenux_monitor" "updated" - return 2 # Update successful - else - msg_warn "Service failed to restart. Check: journalctl -u proxmenux-monitor" - update_config "proxmenux_monitor" "failed" - return 1 - fi - fi -} - -create_monitor_service() { - msg_info "Creating ProxMenux Monitor service..." - - local exec_path="$MONITOR_INSTALL_DIR/ProxMenux-Monitor.AppImage" - - if [ -f "$TEMP_DIR/systemd/proxmenux-monitor.service" ]; then - sed "s|ExecStart=.*|ExecStart=$exec_path|g" \ - "$TEMP_DIR/systemd/proxmenux-monitor.service" > "$MONITOR_SERVICE_FILE" - msg_ok "Using service file from repository." - else - cat > "$MONITOR_SERVICE_FILE" << EOF -[Unit] -Description=ProxMenux Monitor - Web Dashboard -After=network.target - -[Service] -Type=simple -User=root -WorkingDirectory=$MONITOR_INSTALL_DIR -ExecStart=$exec_path -Restart=on-failure -RestartSec=10 -Environment="PORT=$MONITOR_PORT" - -[Install] -WantedBy=multi-user.target -EOF - msg_ok "Created default service file." - fi - - systemctl daemon-reload - systemctl enable proxmenux-monitor.service > /dev/null 2>&1 - systemctl start proxmenux-monitor.service > /dev/null 2>&1 - - sleep 3 - - if systemctl is-active --quiet proxmenux-monitor.service; then - msg_ok "ProxMenux Monitor service started successfully." - update_config "proxmenux_monitor" "installed" - return 0 - else - msg_warn "ProxMenux Monitor service failed to start." - msg_info "Check logs with: journalctl -u proxmenux-monitor -n 20" - msg_info "Check status with: systemctl status proxmenux-monitor" - update_config "proxmenux_monitor" "failed" - return 1 - fi -} - -install_normal_version() { - local total_steps=5 - local current_step=1 - - show_progress $current_step $total_steps "Installing basic dependencies." - - if ! command -v jq > /dev/null 2>&1; then - apt-get update > /dev/null 2>&1 - - if apt-get install -y jq > /dev/null 2>&1 && command -v jq > /dev/null 2>&1; then - update_config "jq" "installed" - else - local jq_url="https://github.com/jqlang/jq/releases/download/jq-1.7.1/jq-linux-amd64" - if wget -q -O /usr/local/bin/jq "$jq_url" 2>/dev/null && chmod +x /usr/local/bin/jq; then - if command -v jq > /dev/null 2>&1; then - update_config "jq" "installed_from_github" - else - msg_error "Failed to install jq. Please install it manually." - update_config "jq" "failed" - return 1 - fi - else - msg_error "Failed to install jq from both APT and GitHub. Please install it manually." - update_config "jq" "failed" - return 1 - fi - fi - else - update_config "jq" "already_installed" - fi - - BASIC_DEPS=("dialog" "curl" "git") - for pkg in "${BASIC_DEPS[@]}"; do - if ! dpkg -l | grep -qw "$pkg"; then - if apt-get install -y "$pkg" > /dev/null 2>&1; then - update_config "$pkg" "installed" - else - msg_error "Failed to install $pkg. Please install it manually." - update_config "$pkg" "failed" - return 1 - fi - else - update_config "$pkg" "already_installed" - fi - done - - msg_ok "jq, dialog, curl and git installed successfully." - - ((current_step++)) - - show_progress $current_step $total_steps "Install ProxMenux repository" - msg_info "Cloning ProxMenux repositoryy." - if ! git clone --depth 1 "$REPO_URL" "$TEMP_DIR" 2>/dev/null; then - msg_error "Failed to clone repository from $REPO_URL" - exit 1 - fi - - msg_ok "Repository cloned successfully." - - cd "$TEMP_DIR" - - ((current_step++)) - - show_progress $current_step $total_steps "Creating directories and configuration" - - mkdir -p "$BASE_DIR" - mkdir -p "$INSTALL_DIR" - - if [ ! -f "$CONFIG_FILE" ]; then - echo '{}' > "$CONFIG_FILE" - fi - - msg_ok "Directories and configuration created." - ((current_step++)) - - show_progress $current_step $total_steps "Copying necessary files" - - cp "./scripts/utils.sh" "$UTILS_FILE" - cp "./menu" "$INSTALL_DIR/$MENU_SCRIPT" - cp "./version.txt" "$LOCAL_VERSION_FILE" - cp "./install_proxmenux.sh" "$BASE_DIR/install_proxmenux.sh" - - mkdir -p "$BASE_DIR/scripts" - cp -r "./scripts/"* "$BASE_DIR/scripts/" - chmod -R +x "$BASE_DIR/scripts/" - chmod +x "$BASE_DIR/install_proxmenux.sh" - msg_ok "Necessary files created." - - chmod +x "$INSTALL_DIR/$MENU_SCRIPT" - - ((current_step++)) - show_progress $current_step $total_steps "Installing ProxMenux Monitor" - - install_proxmenux_monitor - local monitor_status=$? - - if [ $monitor_status -eq 0 ]; then - create_monitor_service - fi - - msg_ok "ProxMenux Normal Version installation completed successfully." -} - -install_translation_version() { - local total_steps=5 - local current_step=1 - - show_progress $current_step $total_steps "Language selection" - select_language - ((current_step++)) - - show_progress $current_step $total_steps "Installing system dependencies" - - if ! command -v jq > /dev/null 2>&1; then - apt-get update > /dev/null 2>&1 - - if apt-get install -y jq > /dev/null 2>&1 && command -v jq > /dev/null 2>&1; then - update_config "jq" "installed" - else - local jq_url="https://github.com/jqlang/jq/releases/download/jq-1.7.1/jq-linux-amd64" - if wget -q -O /usr/local/bin/jq "$jq_url" 2>/dev/null && chmod +x /usr/local/bin/jq; then - if command -v jq > /dev/null 2>&1; then - update_config "jq" "installed_from_github" - else - msg_error "Failed to install jq. Please install it manually." - update_config "jq" "failed" - return 1 - fi - else - msg_error "Failed to install jq from both APT and GitHub. Please install it manually." - update_config "jq" "failed" - return 1 - fi - fi - else - update_config "jq" "already_installed" - fi - - DEPS=("dialog" "curl" "git" "python3" "python3-venv" "python3-pip") - for pkg in "${DEPS[@]}"; do - if ! dpkg -l | grep -qw "$pkg"; then - if apt-get install -y "$pkg" > /dev/null 2>&1; then - update_config "$pkg" "installed" - else - msg_error "Failed to install $pkg. Please install it manually." - update_config "$pkg" "failed" - return 1 - fi - else - update_config "$pkg" "already_installed" - fi - done - - msg_ok "jq, dialog, curl, git, python3, python3-venv and python3-pip installed successfully." - - ((current_step++)) - - show_progress $current_step $total_steps "Setting up translation environment" - - if [ ! -d "$VENV_PATH" ] || [ ! -f "$VENV_PATH/bin/activate" ]; then - python3 -m venv --system-site-packages "$VENV_PATH" > /dev/null 2>&1 - if [ ! -f "$VENV_PATH/bin/activate" ]; then - msg_error "Failed to create virtual environment. Please check your Python installation." - update_config "virtual_environment" "failed" - return 1 - else - update_config "virtual_environment" "created" - fi - else - update_config "virtual_environment" "already_exists" - fi - - source "$VENV_PATH/bin/activate" - - if pip install --upgrade pip > /dev/null 2>&1; then - update_config "pip" "upgraded" - else - msg_error "Failed to upgrade pip." - update_config "pip" "upgrade_failed" - return 1 - fi - - if pip install --break-system-packages --no-cache-dir googletrans==4.0.0-rc1 > /dev/null 2>&1; then - update_config "googletrans" "installed" - else - msg_error "Failed to install googletrans. Please check your internet connection." - update_config "googletrans" "failed" - deactivate - return 1 - fi - - deactivate - - show_progress $current_step $total_steps "Cloning ProxMenux repository" - if ! git clone --depth 1 "$REPO_URL" "$TEMP_DIR" 2>/dev/null; then - msg_error "Failed to clone repository from $REPO_URL" - exit 1 - fi - msg_ok "Repository cloned successfully." - - cd "$TEMP_DIR" - - ((current_step++)) - - show_progress $current_step $total_steps "Copying necessary files" - - mkdir -p "$BASE_DIR" - mkdir -p "$INSTALL_DIR" - - cp "./json/cache.json" "$CACHE_FILE" - msg_ok "Cache file copied with translations." - - cp "./scripts/utils.sh" "$UTILS_FILE" - cp "./menu" "$INSTALL_DIR/$MENU_SCRIPT" - cp "./version.txt" "$LOCAL_VERSION_FILE" - cp "./install_proxmenux.sh" "$BASE_DIR/install_proxmenux.sh" - - mkdir -p "$BASE_DIR/scripts" - cp -r "./scripts/"* "$BASE_DIR/scripts/" - chmod -R +x "$BASE_DIR/scripts/" - chmod +x "$BASE_DIR/install_proxmenux.sh" - msg_ok "Necessary files created." - - chmod +x "$INSTALL_DIR/$MENU_SCRIPT" - - ((current_step++)) - show_progress $current_step $total_steps "Installing ProxMenux Monitor" - - install_proxmenux_monitor - local monitor_status=$? - - if [ $monitor_status -eq 0 ]; then - create_monitor_service - elif [ $monitor_status -eq 2 ]; then - msg_ok "ProxMenux Monitor updated successfully." - fi - - msg_ok "ProxMenux Translation Version installation completed successfully." -} - -show_installation_options() { - local current_install_type - current_install_type=$(check_existing_installation) - local pve_version - pve_version=$(pveversion 2>/dev/null | grep -oP 'pve-manager/\K[0-9]+' | head -1) - - local menu_title="ProxMenux Installation" - local menu_text="Choose installation type:" - - if [ "$current_install_type" != "none" ]; then - case "$current_install_type" in - "translation") - menu_title="ProxMenux Update - Translation Version Detected" - ;; - "normal") - menu_title="ProxMenux Update - Normal Version Detected" - ;; - "unknown") - menu_title="ProxMenux Update - Existing Installation Detected" - ;; - esac - fi - - if [[ "$pve_version" -ge 9 ]]; then - INSTALL_TYPE=$(whiptail --backtitle "ProxMenux" --title "$menu_title" --menu "\n$menu_text" 14 70 2 \ - "1" "Normal Version (English only)" 3>&1 1>&2 2>&3) - - if [ -z "$INSTALL_TYPE" ]; then - show_proxmenux_logo - msg_warn "Installation cancelled." - exit 1 - fi - else - INSTALL_TYPE=$(whiptail --backtitle "ProxMenux" --title "$menu_title" --menu "\n$menu_text" 14 70 2 \ - "1" "Normal Version (English only)" \ - "2" "Translation Version (Multi-language support)" 3>&1 1>&2 2>&3) - - if [ -z "$INSTALL_TYPE" ]; then - show_proxmenux_logo - msg_warn "Installation cancelled." - exit 1 - fi - fi - - if [ -z "$INSTALL_TYPE" ]; then - show_proxmenux_logo - msg_warn "Installation cancelled." - exit 1 - fi - - if [ "$current_install_type" = "none" ]; then - if ! show_installation_confirmation "$INSTALL_TYPE"; then - show_proxmenux_logo - msg_warn "Installation cancelled." - exit 1 - fi - fi - - if ! handle_installation_change "$current_install_type" "$INSTALL_TYPE"; then - show_proxmenux_logo - msg_warn "Installation cancelled." - exit 1 - fi -} - -install_proxmenux() { - show_installation_options - - case "$INSTALL_TYPE" in - "1") - show_proxmenux_logo - msg_title "Installing ProxMenux - Normal Version" - install_normal_version - ;; - "2") - show_proxmenux_logo - msg_title "Installing ProxMenux - Translation Version" - install_translation_version - ;; - *) - msg_error "Invalid option selected." - exit 1 - ;; - esac - - if [[ -f "$UTILS_FILE" ]]; then - source "$UTILS_FILE" - fi - - msg_title "ProxMenux has been installed successfully" - - if systemctl is-active --quiet proxmenux-monitor.service; then - local server_ip=$(get_server_ip) - echo -e "${GN}🌐 ProxMenux Monitor activated${CL}: ${BL}http://${server_ip}:${MONITOR_PORT}${CL}" - echo - fi - - echo -ne "${GN}" - type_text "To run ProxMenux, simply execute this command in the console or terminal:" - echo -e "${YWB} menu${CL}" - echo -} - -if [ "$(id -u)" -ne 0 ]; then - msg_error "This script must be run as root." - exit 1 -fi - -cleanup_corrupted_files -install_proxmenux