From b14461d0fe56141115687995dc67f4c63e6a0527 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sim=C3=B3n=20Hurtado?= Date: Wed, 15 Apr 2026 14:37:32 -0500 Subject: [PATCH] =?UTF-8?q?Actualizaci=C3=B3n=20posinstalaci=C3=B3n=20GCP?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Custom/README.txt | 85 +++ Custom/backvicibox/create-admin-sapian.sh | 20 +- Custom/backvicibox/install-vicibox.log | 96 +++ Custom/backvicibox/install-vicibox.sh | 98 ++- Custom/backvicibox3/create-admin-sapian.sh | 22 +- Custom/backvicibox3/install-vicibox.log | 807 +++++++++++++++++++++ Custom/backvicibox3/install-vicibox.sh | 96 ++- Custom/stage_custom_assets.sh | 88 +++ 8 files changed, 1267 insertions(+), 45 deletions(-) create mode 100644 Custom/README.txt create mode 100644 Custom/backvicibox/install-vicibox.log create mode 100644 Custom/stage_custom_assets.sh diff --git a/Custom/README.txt b/Custom/README.txt new file mode 100644 index 0000000..d0c2565 --- /dev/null +++ b/Custom/README.txt @@ -0,0 +1,85 @@ +========================================== +BACKUP DE VICIBOX - AMBIENTE DE CONFIGURACIÓN +========================================== + +Fecha de creación: Fri Feb 6 04:46:49 PM UTC 2026 + + +INSTRUCCIONES RÁPIDAS (instalación automática): +---------------------------------------------- +1. Instalar git zypper install git +2. git clone https://git.sapian.cloud/Sapian/vicidial_sapian.git (Se descargan los archivos instalador voe y custom) + +1. Copiar este directorio al servidor destino, debe quedar en la ruta /home/ ej. /home/backvicibox). + +2. Ejecutar el instalador (instala dependencias, restore, parches y express): + cd /home/backvicibox + sudo chmod +x install-vicibox.sh restore.sh apply-vicibox-patches.sh + sudo ./install-vicibox.sh + + NOTA + El script ./install-vicibox.sh ejecuta todos los sh necesarios para la instalacion + +3. Revisar el log si algo falla: install-vicibox.log + + + + +ARCHIVOS INCLUIDOS: +------------------- +1. vicibox-scripts.tar.gz + - Todos los scripts de instalación y configuración de Vicibox + - Ubicación original: /usr/share/vicibox/ + +2. astguiclient-trunk.tar.gz + - Código fuente completo de ViciDial + - Ubicación original: /usr/src/astguiclient/trunk/ + +3. restore.sh + - Script para restaurar los archivos en el servidor destino + +4. install-vicibox.sh (NUEVO) + - Instalación completa en orden: Perl → MariaDB → PHP → Apache + - Configura Apache para apuntar a /vicidial/welcome.php + - Ejecuta restore.sh, aplica parches a vicibox-install.pl y lanza --vicibox-express + - Uso: sudo ./install-vicibox.sh + +5. apply-vicibox-patches.sh (NUEVO) + - Aplica parches a vicibox-install.pl (socket MySQL, random_pass, DBI) + - Se usa automáticamente desde install-vicibox.sh si no existe patches/vicibox-install.pl + +6. patches/ + - vicibox-install.pl: copia del instalador con parches ya aplicados (recomendado) + - README.txt: descripción de los parches + +7. version-info.txt + - Información de versiones y sistema + + + +INSTRUCCIONES MANUALES (paso a paso): +------------------------------------ +1. Instalar dependencias: Perl (y DBI, DBD-mysql, LWP::Simple), Subversion, + MariaDB, PHP 8 (y apache2-mod_php8, php8-mysql), Apache2. +2. Configurar Apache para que la URL principal sirva /vicidial/welcome.php. +3. Ejecutar: sudo ./restore.sh +4. Aplicar parches (copiar patches/vicibox-install.pl a /usr/share/vicibox/ + o ejecutar apply-vicibox-patches.sh). +5. Ejecutar: echo y | sudo /usr/share/vicibox/vicibox-install.pl --vicibox-express +6. En /etc/astguiclient.conf poner VARDB_server => 127.0.0.1 para la web. + +REQUISITOS DEL SERVIDOR DESTINO: +-------------------------------- +- Sistema operativo: openSUSE Leap / SUSE Linux Enterprise (SLE 15 SP6) +- install-vicibox.sh instala: Perl, DBI, DBD-mysql, libwww-perl, subversion, + MariaDB, PHP 8, Apache2. Asterisk se gestiona por el instalador ViciBox. +- Acceso a internet (recomendado para repos y actualizaciones). + +NOTAS: +------ +- El tamaño total comprimido es aproximadamente 50-70 MB. +- Log de install-vicibox.sh: install-vicibox.log en este directorio. +- Log del instalador ViciBox: /var/log/vicibox.log. +- Acceso web tras instalación: http:///vicidial/welcome.php + +========================================== diff --git a/Custom/backvicibox/create-admin-sapian.sh b/Custom/backvicibox/create-admin-sapian.sh index ab193fd..3d4571b 100644 --- a/Custom/backvicibox/create-admin-sapian.sh +++ b/Custom/backvicibox/create-admin-sapian.sh @@ -8,8 +8,16 @@ set -e -# Usar 127.0.0.1 para evitar problemas de socket con MariaDB -MYSQL_OPTS="-h 127.0.0.1 -u root" +# Conexión root: probar socket local primero, luego TCP +MYSQL_OPTS="" +if mariadb -u root -e "SELECT 1" >/dev/null 2>&1; then + MYSQL_OPTS="-u root" +elif mariadb -h 127.0.0.1 -u root -e "SELECT 1" >/dev/null 2>&1; then + MYSQL_OPTS="-h 127.0.0.1 -u root" +else + echo "No se pudo conectar a MariaDB como root (socket ni 127.0.0.1)." + exit 1 +fi DB="asterisk" USER="sapian" PASS="sap64adm" @@ -27,11 +35,13 @@ fi # Crear usuario administrador (user_level 9 = admin). Si ya existe, actualizar contraseña. mariadb $MYSQL_OPTS "$DB" << EOF -INSERT INTO vicidial_users (user, pass, full_name, user_level, user_group, load_leads, campaign_detail, ast_admin_access, modify_users, alter_agent_interface_options, active) -VALUES ('$USER', '$PASS', '$FULL_NAME', '9', 'ADMIN', '1', '1', '1', '1', '1', 'Y') +INSERT INTO vicidial_users (user, pass, full_name, user_level, user_group, load_leads, campaign_detail, ast_admin_access, modify_users, alter_agent_interface_options, view_reports, active) +VALUES ('$USER', '$PASS', '$FULL_NAME', '9', 'ADMIN', '1', '1', '1', '1', '1', '1', 'Y') ON DUPLICATE KEY UPDATE pass = VALUES(pass), full_name = VALUES(full_name), user_level = 9, active = 'Y', - load_leads = '1', campaign_detail = '1', ast_admin_access = '1', modify_users = '1', alter_agent_interface_options = '1'; + load_leads = '1', campaign_detail = '1', ast_admin_access = '1', modify_users = '1', alter_agent_interface_options = '1', view_reports = '1'; EOF +mariadb $MYSQL_OPTS "$DB" -e "UPDATE system_settings SET first_login_trigger='N' WHERE first_login_trigger='Y' LIMIT 1;" 2>/dev/null || true + echo "Usuario administrador creado/actualizado: $USER (password: $PASS)" echo "Acceso: http:///vicidial/admin.php — iniciar sesión con $USER / $PASS" diff --git a/Custom/backvicibox/install-vicibox.log b/Custom/backvicibox/install-vicibox.log new file mode 100644 index 0000000..3625888 --- /dev/null +++ b/Custom/backvicibox/install-vicibox.log @@ -0,0 +1,96 @@ +[INFO] ========================================== +[INFO] Instalación ViciBox (dependencias + restore + express) +[INFO] ========================================== +[INFO] 1. Instalando Perl, Subversion y módulos (DBI, DBD-mysql, LWP::Simple)... +Refreshing service 'openSUSE'. +Retrieving repository 'asterisk (16.0)' metadata [... +Looking for gpg keys in repository asterisk (16.0). + gpgkey=https://download.opensuse.org/repositories/home:/vicidial:/asterisk-18/16.0/repodata/repomd.xml.key +... + +New repository or package signing key received: + + Repository: asterisk (16.0) + Key Fingerprint: 5559 D26A 181B 440B 9224 982F 0769 727B F189 E8B9 + Key Name: home:vicidial OBS Project + Key Algorithm: RSA 2048 + Key Created: Mon Feb 2 13:49:16 2026 + Key Expires: Wed Apr 12 13:49:16 2028 + Rpm Name: gpg-pubkey-f189e8b9-6980ab5c + + + + Note: Signing data enables the recipient to verify that no modifications occurred after the data + were signed. Accepting data with no, wrong or unknown signature can lead to a corrupted system + and in extreme cases even to a system compromise. + + Note: A GPG pubkey is clearly identified by its fingerprint. Do not rely on the key's name. If + you are not sure whether the presented key is authentic, ask the repository provider or check + their web site. Many providers maintain a web page showing the fingerprints of the GPG keys they + are using. + +Do you want to reject the key, trust temporarily, or trust always? [r/t/a/?] (r): r +error] +Repository 'asterisk (16.0)' is invalid. +[home_vicidial_asterisk-18|https://download.opensuse.org/repositories/home:/vicidial:/asterisk-18/16.0/] Failed to retrieve new repository metadata. +History: + - Signature verification failed for repomd.xml +Please check if the URIs defined for this repository are pointing to a valid repository. +Warning: Skipping repository 'asterisk (16.0)' because of the above error. +Some of the repositories have not been refreshed because of an error. +Loading repository data... +Reading installed packages... +'perl' is already installed. +No update candidate for 'perl-5.42.0-160000.2.2.x86_64'. The highest available version is already installed. +'perl-DBD-mysql' is already installed. +No update candidate for 'perl-DBD-mysql-4.050-160000.2.2.x86_64'. The highest available version is already installed. +'perl-DBI' is already installed. +No update candidate for 'perl-DBI-1.647.0-160000.2.2.x86_64'. The highest available version is already installed. +'libwww-perl' not found in package names. Trying capabilities. +No provider of 'libwww-perl' found. +[INFO] Perl: +[INFO] 2. Instalando MariaDB... +Refreshing service 'openSUSE'. +Retrieving repository 'asterisk (16.0)' metadata [... +Looking for gpg keys in repository asterisk (16.0). + gpgkey=https://download.opensuse.org/repositories/home:/vicidial:/asterisk-18/16.0/repodata/repomd.xml.key +... + +New repository or package signing key received: + + Repository: asterisk (16.0) + Key Fingerprint: 5559 D26A 181B 440B 9224 982F 0769 727B F189 E8B9 + Key Name: home:vicidial OBS Project + Key Algorithm: RSA 2048 + Key Created: Mon Feb 2 13:49:16 2026 + Key Expires: Wed Apr 12 13:49:16 2028 + Rpm Name: gpg-pubkey-f189e8b9-6980ab5c + + + + Note: Signing data enables the recipient to verify that no modifications occurred after the data + were signed. Accepting data with no, wrong or unknown signature can lead to a corrupted system + and in extreme cases even to a system compromise. + + Note: A GPG pubkey is clearly identified by its fingerprint. Do not rely on the key's name. If + you are not sure whether the presented key is authentic, ask the repository provider or check + their web site. Many providers maintain a web page showing the fingerprints of the GPG keys they + are using. + +Do you want to reject the key, trust temporarily, or trust always? [r/t/a/?] (r): r +error] +Repository 'asterisk (16.0)' is invalid. +[home_vicidial_asterisk-18|https://download.opensuse.org/repositories/home:/vicidial:/asterisk-18/16.0/] Failed to retrieve new repository metadata. +History: + - Signature verification failed for repomd.xml +Please check if the URIs defined for this repository are pointing to a valid repository. +Warning: Skipping repository 'asterisk (16.0)' because of the above error. +Some of the repositories have not been refreshed because of an error. +Loading repository data... +Reading installed packages... +'mariadb' is already installed. +No update candidate for 'mariadb-11.8.5-160000.3.1.x86_64'. The highest available version is already installed. +'mariadb-client' is already installed. +No update candidate for 'mariadb-client-11.8.5-160000.3.1.x86_64'. The highest available version is already installed. +Resolving package dependencies... +Nothing to do. diff --git a/Custom/backvicibox/install-vicibox.sh b/Custom/backvicibox/install-vicibox.sh index 091c153..ffbac38 100644 --- a/Custom/backvicibox/install-vicibox.sh +++ b/Custom/backvicibox/install-vicibox.sh @@ -28,6 +28,9 @@ if [ "$EUID" -ne 0 ]; then exit 1 fi +# zypper: --gpg-auto-import-keys evita el prompt "reject/trust" en repos OBS (ej. Asterisk). +# Si pulsaste "r" (reject), el repo queda inválido: zypper rr home_vicidial_asterisk-18 y vuelve a añadirlo con --gpg-auto-import-keys ar ... + # Comprobar que estamos en backvicibox y existen archivos if [ ! -f "${SCRIPT_DIR}/restore.sh" ]; then error "No se encuentra restore.sh. Ejecutar desde el directorio backvicibox." @@ -43,15 +46,24 @@ info "Instalación ViciBox (dependencias + restore + express)" info "==========================================" echo "" -# --- 1. Perl (versión del sistema) y módulos --- -info "1. Instalando Perl, Subversion y módulos (DBI, DBD-mysql, LWP::Simple)..." -zypper -n install -y perl perl-DBI perl-DBD-mysql libwww-perl subversion >> "$LOG_FILE" 2>&1 || true +# --- 0. Módulos Perl (antes que todo) --- +info "0. Instalando módulos Perl requeridos (perl-DBI, perl-DBD-mysql, perl-libwww-perl)..." +zypper --gpg-auto-import-keys -n install -y perl-DBI perl-DBD-mysql perl-libwww-perl >> "$LOG_FILE" 2>&1 || true +info " perl-DBI, perl-DBD-mysql, perl-libwww-perl instalados" +echo "" + +# --- 1. Perl, LWP, Subversion y cron (crontab) --- +# En openSUSE el paquete es perl-libwww-perl, no libwww-perl (Debian). +info "1. Instalando Perl, perl-libwww-perl, Subversion y cronie..." +zypper --gpg-auto-import-keys -n install -y perl perl-DBI perl-DBD-mysql perl-libwww-perl subversion cronie >> "$LOG_FILE" 2>&1 +systemctl enable cron >> "$LOG_FILE" 2>&1 || systemctl enable crond >> "$LOG_FILE" 2>&1 || true +systemctl start cron >> "$LOG_FILE" 2>&1 || systemctl start crond >> "$LOG_FILE" 2>&1 || true info " Perl: $(perl -v 2>&1 | head -1)" echo "" # --- 2. MariaDB --- info "2. Instalando MariaDB..." -zypper -n install -y mariadb mariadb-client >> "$LOG_FILE" 2>&1 +zypper --gpg-auto-import-keys -n install -y mariadb mariadb-client >> "$LOG_FILE" 2>&1 systemctl enable mariadb >> "$LOG_FILE" 2>&1 systemctl start mariadb >> "$LOG_FILE" 2>&1 info " MariaDB instalado y en ejecución" @@ -60,16 +72,16 @@ echo "" # --- 3. PHP 8 y módulo Apache --- info "3. Instalando PHP 8 y módulo Apache..." if ! zypper lr | grep -q "devel_languages_php_php80"; then - zypper -n addrepo https://download.opensuse.org/repositories/devel:languages:php:php80/SLE_15_SP6/devel:languages:php:php80.repo + zypper --gpg-auto-import-keys -n addrepo https://download.opensuse.org/repositories/devel:languages:php:php80/SLE_15_SP6/devel:languages:php:php80.repo fi -zypper --no-gpg-checks -n refresh >> "$LOG_FILE" 2>&1 -zypper -n install -y php8 apache2-mod_php8 php8-mysql >> "$LOG_FILE" 2>&1 +zypper --gpg-auto-import-keys --no-gpg-checks -n refresh >> "$LOG_FILE" 2>&1 +zypper --gpg-auto-import-keys -n install -y php8 apache2-mod_php8 php8-mysql >> "$LOG_FILE" 2>&1 info " PHP $(php8 -v 2>/dev/null | head -1 || true) instalado" echo "" # --- 4. Apache --- info "4. Instalando Apache y configurando welcome.php..." -zypper -n install -y apache2 apache2-prefork >> "$LOG_FILE" 2>&1 +zypper --gpg-auto-import-keys -n install -y apache2 apache2-prefork >> "$LOG_FILE" 2>&1 # Configurar que la raíz y /vicidial apunten a welcome.php cat > /etc/apache2/conf.d/vicidial-welcome.conf << 'APACHECONF' # ViciDial: URL principal -> vicidial/welcome.php @@ -85,6 +97,59 @@ APACHECONF systemctl enable apache2 >> "$LOG_FILE" 2>&1 systemctl start apache2 >> "$LOG_FILE" 2>&1 info " Apache instalado y apuntando a /vicidial/welcome.php" +if command -v getenforce >/dev/null 2>&1 && [ "$(getenforce 2>/dev/null)" = "Enforcing" ]; then + setsebool -P httpd_can_network_connect_db 1 >> "$LOG_FILE" 2>&1 || true + setsebool -P httpd_can_network_connect 1 >> "$LOG_FILE" 2>&1 || true + info " SELinux: permitida conexión Apache→MariaDB (httpd_can_network_connect*)" +fi +for PHPINI in /etc/php8/apache2/php.ini /etc/php7/apache2/php.ini; do + if [ -f "$PHPINI" ]; then + sed -i 's/^;\?pcre\.jit=.*/pcre.jit=0/' "$PHPINI" + systemctl reload apache2 >> "$LOG_FILE" 2>&1 || true + break + fi +done +echo "" + +# --- 4b. Asterisk (requerido por vicibox-install) --- +# OBS usa rutas: home:/vicidial:/asterisk-18 +info "4b. Instalando Asterisk (repositorio VICIdial asterisk-18)..." +AST_REPO_FILE="home:vicidial:asterisk-18.repo" +AST_REPO_BASE="https://download.opensuse.org/repositories/home:/vicidial:/asterisk-18" +AST_OS_VER="" +[ -f /etc/os-release ] && AST_OS_VER=$(grep -E '^VERSION_ID=' /etc/os-release | cut -d'"' -f2) +AST_VERSIONS="$AST_OS_VER 16.0 15.6 15.5" +AST_REPO_ADDED=0 +for AST_VER in $AST_VERSIONS; do + [ -z "$AST_VER" ] && continue + if zypper lr 2>/dev/null | grep -qiE 'vicidial|asterisk-18'; then + AST_REPO_ADDED=1 + break + fi + REPO_URL="${AST_REPO_BASE}/${AST_VER}/${AST_REPO_FILE}" + info " Probando repositorio Asterisk (${AST_VER}): ${REPO_URL}" + if zypper --gpg-auto-import-keys -n addrepo --refresh "$REPO_URL" >> "$LOG_FILE" 2>&1; then + AST_REPO_ADDED=1 + break + fi +done +if [ "$AST_REPO_ADDED" = "1" ]; then + info " Refrescando repositorios..." + zypper --gpg-auto-import-keys --no-gpg-checks -n refresh >> "$LOG_FILE" 2>&1 + info " Instalando asterisk..." + if zypper --gpg-auto-import-keys -n install -y asterisk >> "$LOG_FILE" 2>&1; then + info " Habilitando e iniciando asterisk..." + systemctl enable asterisk >> "$LOG_FILE" 2>&1 + systemctl start asterisk >> "$LOG_FILE" 2>&1 || true + info " Asterisk: $(asterisk -V 2>/dev/null || echo 'revisar servicio')" + else + warn " zypper no pudo instalar el paquete asterisk. Revisa install-vicibox.log" + fi +else + warn " No se pudo añadir el repo Asterisk. Manual (Leap 16.0):" + warn " zypper ar --refresh ${AST_REPO_BASE}/16.0/${AST_REPO_FILE}" + warn " zypper --gpg-auto-import-keys --no-gpg-checks ref && zypper in -y asterisk && systemctl enable --now asterisk" +fi echo "" # --- 5. Restore (scripts y código fuente) --- @@ -93,6 +158,21 @@ cd "$SCRIPT_DIR" ./restore.sh >> "$LOG_FILE" 2>&1 echo "" +# --- 5b. Propietario Apache y SELinux RW (evita 500 en admin.php) --- +info "5b. Permisos web Vicidial (wwwrun + SELinux httpd_sys_rw_content_t)..." +if [ -d /srv/www/htdocs/vicidial ]; then + chown -R wwwrun:www /srv/www/htdocs/vicidial >> "$LOG_FILE" 2>&1 +fi +if [ -d /srv/www/htdocs/agc ]; then + chown -R wwwrun:www /srv/www/htdocs/agc >> "$LOG_FILE" 2>&1 +fi +if [ "$(getenforce 2>/dev/null)" = "Enforcing" ]; then + [ -d /srv/www/htdocs/vicidial ] && chcon -R -t httpd_sys_rw_content_t /srv/www/htdocs/vicidial >> "$LOG_FILE" 2>&1 || true + [ -d /srv/www/htdocs/agc ] && chcon -R -t httpd_sys_rw_content_t /srv/www/htdocs/agc >> "$LOG_FILE" 2>&1 || true +fi +info " Listo (escritura bajo /srv/www/htdocs/vicidial y agc)" +echo "" + # --- 6. Aplicar parches a vicibox-install.pl --- info "6. Aplicando parches a vicibox-install.pl (socket MySQL, random_pass, etc.)..." if [ -f "${SCRIPT_DIR}/patches/vicibox-install.pl" ]; then @@ -143,7 +223,7 @@ info "==========================================" info "Proceso de instalación finalizado" info "==========================================" info "Log guardado en: $LOG_FILE" -info "Comprueba el estado de servicios: systemctl status mariadb apache2" +info "Comprueba el estado de servicios: systemctl status mariadb apache2 asterisk" info "Acceso web: http:///vicidial/welcome.php" info "Admin ViciDial: usuario sapian, password sap64adm (admin.php)" echo "" diff --git a/Custom/backvicibox3/create-admin-sapian.sh b/Custom/backvicibox3/create-admin-sapian.sh index ab193fd..b965e11 100644 --- a/Custom/backvicibox3/create-admin-sapian.sh +++ b/Custom/backvicibox3/create-admin-sapian.sh @@ -8,8 +8,16 @@ set -e -# Usar 127.0.0.1 para evitar problemas de socket con MariaDB -MYSQL_OPTS="-h 127.0.0.1 -u root" +# Conexión root: probar socket local primero, luego TCP (evita fallos según auth de MariaDB) +MYSQL_OPTS="" +if mariadb -u root -e "SELECT 1" >/dev/null 2>&1; then + MYSQL_OPTS="-u root" +elif mariadb -h 127.0.0.1 -u root -e "SELECT 1" >/dev/null 2>&1; then + MYSQL_OPTS="-h 127.0.0.1 -u root" +else + echo "No se pudo conectar a MariaDB como root (socket ni 127.0.0.1)." + exit 1 +fi DB="asterisk" USER="sapian" PASS="sap64adm" @@ -26,12 +34,16 @@ if ! mariadb $MYSQL_OPTS -e "USE $DB" 2>/dev/null; then fi # Crear usuario administrador (user_level 9 = admin). Si ya existe, actualizar contraseña. +# view_reports=1: necesario para permisos de informes; sin first_login desactivado el menú queda solo en "Reports". mariadb $MYSQL_OPTS "$DB" << EOF -INSERT INTO vicidial_users (user, pass, full_name, user_level, user_group, load_leads, campaign_detail, ast_admin_access, modify_users, alter_agent_interface_options, active) -VALUES ('$USER', '$PASS', '$FULL_NAME', '9', 'ADMIN', '1', '1', '1', '1', '1', 'Y') +INSERT INTO vicidial_users (user, pass, full_name, user_level, user_group, load_leads, campaign_detail, ast_admin_access, modify_users, alter_agent_interface_options, view_reports, active) +VALUES ('$USER', '$PASS', '$FULL_NAME', '9', 'ADMIN', '1', '1', '1', '1', '1', '1', 'Y') ON DUPLICATE KEY UPDATE pass = VALUES(pass), full_name = VALUES(full_name), user_level = 9, active = 'Y', - load_leads = '1', campaign_detail = '1', ast_admin_access = '1', modify_users = '1', alter_agent_interface_options = '1'; + load_leads = '1', campaign_detail = '1', ast_admin_access = '1', modify_users = '1', alter_agent_interface_options = '1', view_reports = '1'; EOF +# Con first_login_trigger=Y ViciDial fuerza ADD=999995 y oculta el menú completo (solo Reports). +mariadb $MYSQL_OPTS "$DB" -e "UPDATE system_settings SET first_login_trigger='N' WHERE first_login_trigger='Y' LIMIT 1;" 2>/dev/null || true + echo "Usuario administrador creado/actualizado: $USER (password: $PASS)" echo "Acceso: http:///vicidial/admin.php — iniciar sesión con $USER / $PASS" diff --git a/Custom/backvicibox3/install-vicibox.log b/Custom/backvicibox3/install-vicibox.log index beeda2d..45d87d5 100644 --- a/Custom/backvicibox3/install-vicibox.log +++ b/Custom/backvicibox3/install-vicibox.log @@ -741,3 +741,810 @@ La base de datos asterisk no existe o no hay acceso. Ejecutar después de la ins [INFO] Comprueba el estado de servicios: systemctl status mariadb apache2 asterisk [INFO] Acceso web: http:///vicidial/welcome.php [INFO] Admin ViciDial: usuario sapian, password sap64adm (admin.php) +[INFO] ========================================== +[INFO] Instalación ViciBox (dependencias + restore + express) +[INFO] ========================================== +[INFO] 0. Instalando módulos Perl requeridos (perl-DBI, perl-DBD-mysql, perl-libwww-perl)... +Refreshing service 'openSUSE'. +Loading repository data... +Reading installed packages... +Resolving package dependencies... + +The following recommended package was automatically selected: + perl-LWP-Protocol-https + +The following 24 NEW packages are going to be installed: + libmariadb3 perl-Clone perl-DBD-mysql perl-DBI perl-Encode-Locale perl-File-Listing perl-HTML-Parser perl-HTML-Tagset perl-HTTP-Cookies perl-HTTP-Date perl-HTTP-Message perl-HTTP-Negotiate perl-IO-HTML perl-IO-Socket-SSL perl-LWP-MediaTypes perl-LWP-Protocol-https perl-MIME-Base32 perl-Net-HTTP perl-Net-SSLeay perl-TimeDate perl-Try-Tiny perl-URI perl-WWW-RobotRules perl-libwww-perl + +24 new packages to install. + +Package download size: 2.9 MiB + +Package install size change: + | 7.1 MiB required by packages that will be installed + 7.1 MiB | - 0 B released by packages that will be removed + +Backend: classic_rpmtrans +Continue? [y/n/v/...? shows all options] (y): y +Preloading Packages [.. +Preloading: perl-HTTP-Cookies-6.110.0-160000.2.2.noarch.rpm [done] +. +Preloading: perl-HTTP-Negotiate-6.01-160000.2.2.noarch.rpm [done] +. +Preloading: perl-LWP-Protocol-https-6.140.0-160000.2.2.noarch.rpm [done] +. +Preloading: perl-HTML-Parser-3.830.0-160000.2.2.x86_64.rpm [done] +. +Preloading: perl-Net-HTTP-6.23-160000.2.2.noarch.rpm [done] +. +Preloading: perl-HTTP-Message-7.0.0-160000.2.2.noarch.rpm [done] +. +Preloading: perl-File-Listing-6.160.0-160000.2.2.noarch.rpm [done] +. +Preloading: perl-HTTP-Date-6.06-160000.2.2.noarch.rpm [done] +. +Preloading: perl-libwww-perl-6.770.0-160000.2.2.noarch.rpm [done] +. +Preloading: libmariadb3-3.4.5-160000.2.2.x86_64.rpm [done] +. +Preloading: perl-WWW-RobotRules-6.02-160000.2.2.noarch.rpm [done] +. +Preloading: perl-TimeDate-2.33-160000.2.2.noarch.rpm [done] +. +Preloading: perl-IO-Socket-SSL-2.89.0-160000.2.2.noarch.rpm [done] +. +Preloading: perl-MIME-Base32-1.303.0-160000.2.2.noarch.rpm [done] +. +Preloading: perl-LWP-MediaTypes-6.04-160000.2.2.noarch.rpm [done] +. +Preloading: perl-DBD-mysql-4.050-160000.2.2.x86_64.rpm [done] +. +Preloading: perl-Try-Tiny-0.31-160000.2.2.noarch.rpm [done] +. +Preloading: perl-Net-SSLeay-1.940.0-160000.2.2.x86_64.rpm [done] +. +Preloading: perl-URI-5.310.0-160000.2.2.noarch.rpm [done] +. +Preloading: perl-IO-HTML-1.004-160000.2.2.noarch.rpm [done] +. +Preloading: perl-HTML-Tagset-3.240.0-160000.2.2.noarch.rpm [done] +. +Preloading: perl-Encode-Locale-1.05-160000.2.2.noarch.rpm [done] +. +Preloading: perl-DBI-1.647.0-160000.2.2.x86_64.rpm [done] +.. +Preloading: perl-Clone-0.46-160000.2.2.x86_64.rpm [done] +.done] +Retrieving: libmariadb3-3.4.5-160000.2.2.x86_64 (repo-oss (16.0)) (1/24), 157.7 KiB +Retrieving: perl-Clone-0.46-160000.2.2.x86_64 (repo-oss (16.0)) (2/24), 23.1 KiB +Retrieving: perl-DBI-1.647.0-160000.2.2.x86_64 (repo-oss (16.0)) (3/24), 859.3 KiB +Retrieving: perl-Encode-Locale-1.05-160000.2.2.noarch (repo-oss (16.0)) (4/24), 22.4 KiB +Retrieving: perl-HTML-Tagset-3.240.0-160000.2.2.noarch (repo-oss (16.0)) (5/24), 19.3 KiB +Retrieving: perl-IO-HTML-1.004-160000.2.2.noarch (repo-oss (16.0)) (6/24), 28.5 KiB +Retrieving: perl-LWP-MediaTypes-6.04-160000.2.2.noarch (repo-oss (16.0)) (7/24), 34.2 KiB +Retrieving: perl-MIME-Base32-1.303.0-160000.2.2.noarch (repo-oss (16.0)) (8/24), 20.3 KiB +Retrieving: perl-Net-SSLeay-1.940.0-160000.2.2.x86_64 (repo-oss (16.0)) (9/24), 422.1 KiB +Retrieving: perl-TimeDate-2.33-160000.2.2.noarch (repo-oss (16.0)) (10/24), 51.6 KiB +Retrieving: perl-Try-Tiny-0.31-160000.2.2.noarch (repo-oss (16.0)) (11/24), 33.8 KiB +Retrieving: perl-DBD-mysql-4.050-160000.2.2.x86_64 (repo-oss (16.0)) (12/24), 170.5 KiB +Retrieving: perl-URI-5.310.0-160000.2.2.noarch (repo-oss (16.0)) (13/24), 137.2 KiB +Retrieving: perl-IO-Socket-SSL-2.89.0-160000.2.2.noarch (repo-oss (16.0)) (14/24), 277.2 KiB +Retrieving: perl-HTTP-Date-6.06-160000.2.2.noarch (repo-oss (16.0)) (15/24), 28.4 KiB +Retrieving: perl-WWW-RobotRules-6.02-160000.2.2.noarch (repo-oss (16.0)) (16/24), 19.5 KiB +Retrieving: perl-Net-HTTP-6.23-160000.2.2.noarch (repo-oss (16.0)) (17/24), 42.6 KiB +Retrieving: perl-HTTP-Message-7.0.0-160000.2.2.noarch (repo-oss (16.0)) (18/24), 116.5 KiB +Retrieving: perl-File-Listing-6.160.0-160000.2.2.noarch (repo-oss (16.0)) (19/24), 26.2 KiB +Retrieving: perl-HTTP-Negotiate-6.01-160000.2.2.noarch (repo-oss (16.0)) (20/24), 20.1 KiB +Retrieving: perl-HTTP-Cookies-6.110.0-160000.2.2.noarch (repo-oss (16.0)) (21/24), 39.3 KiB +Retrieving: perl-HTML-Parser-3.830.0-160000.2.2.x86_64 (repo-oss (16.0)) (22/24), 121.1 KiB +Retrieving: perl-libwww-perl-6.770.0-160000.2.2.noarch (repo-oss (16.0)) (23/24), 228.2 KiB +Retrieving: perl-LWP-Protocol-https-6.140.0-160000.2.2.noarch (repo-oss (16.0)) (24/24), 27.4 KiB + +Checking for file conflicts: [..done] +( 1/24) Installing: libmariadb3-3.4.5-160000.2.2.x86_64 [..done] +( 2/24) Installing: perl-Clone-0.46-160000.2.2.x86_64 [..done] +( 3/24) Installing: perl-DBI-1.647.0-160000.2.2.x86_64 [...done] +( 4/24) Installing: perl-Encode-Locale-1.05-160000.2.2.noarch [..done] +( 5/24) Installing: perl-HTML-Tagset-3.240.0-160000.2.2.noarch [..done] +( 6/24) Installing: perl-IO-HTML-1.004-160000.2.2.noarch [..done] +( 7/24) Installing: perl-LWP-MediaTypes-6.04-160000.2.2.noarch [..done] +( 8/24) Installing: perl-MIME-Base32-1.303.0-160000.2.2.noarch [..done] +( 9/24) Installing: perl-Net-SSLeay-1.940.0-160000.2.2.x86_64 [..done] +(10/24) Installing: perl-TimeDate-2.33-160000.2.2.noarch [..done] +(11/24) Installing: perl-Try-Tiny-0.31-160000.2.2.noarch [..done] +(12/24) Installing: perl-DBD-mysql-4.050-160000.2.2.x86_64 [..done] +(13/24) Installing: perl-URI-5.310.0-160000.2.2.noarch [..done] +(14/24) Installing: perl-IO-Socket-SSL-2.89.0-160000.2.2.noarch [..done] +(15/24) Installing: perl-HTTP-Date-6.06-160000.2.2.noarch [..done] +(16/24) Installing: perl-WWW-RobotRules-6.02-160000.2.2.noarch [..done] +(17/24) Installing: perl-Net-HTTP-6.23-160000.2.2.noarch [..done] +(18/24) Installing: perl-HTTP-Message-7.0.0-160000.2.2.noarch [..done] +(19/24) Installing: perl-File-Listing-6.160.0-160000.2.2.noarch [..done] +(20/24) Installing: perl-HTTP-Negotiate-6.01-160000.2.2.noarch [..done] +(21/24) Installing: perl-HTTP-Cookies-6.110.0-160000.2.2.noarch [..done] +(22/24) Installing: perl-HTML-Parser-3.830.0-160000.2.2.x86_64 [..done] +(23/24) Installing: perl-libwww-perl-6.770.0-160000.2.2.noarch [..done] +(24/24) Installing: perl-LWP-Protocol-https-6.140.0-160000.2.2.noarch [..done] +Running post-transaction scripts [...done] +[INFO] perl-DBI, perl-DBD-mysql, perl-libwww-perl instalados +[INFO] 1. Instalando Perl, Subversion y resto de dependencias... +Refreshing service 'openSUSE'. +Loading repository data... +Reading installed packages... +'perl' is already installed. +No update candidate for 'perl-5.42.0-160000.2.2.x86_64'. The highest available version is already installed. +'perl-DBD-mysql' is already installed. +No update candidate for 'perl-DBD-mysql-4.050-160000.2.2.x86_64'. The highest available version is already installed. +'perl-DBI' is already installed. +No update candidate for 'perl-DBI-1.647.0-160000.2.2.x86_64'. The highest available version is already installed. +'libwww-perl' not found in package names. Trying capabilities. +No provider of 'libwww-perl' found. +[INFO] Perl: +[INFO] 2. Instalando MariaDB... +Refreshing service 'openSUSE'. +Loading repository data... +Reading installed packages... +Resolving package dependencies... + +The following recommended package was automatically selected: + mariadb + +The following 8 NEW packages are going to be installed: + libJudy1 libltdl7 libodbc2 libpcre2-posix3 mariadb mariadb-client mariadb-errormessages python313-mysqlclient + +8 new packages to install. + +Package download size: 25.8 MiB + +Package install size change: + | 151.3 MiB required by packages that will be installed + 151.3 MiB | - 0 B released by packages that will be removed + +Backend: classic_rpmtrans +Continue? [y/n/v/...? shows all options] (y): y +Preloading Packages [.. +Preloading: libpcre2-posix3-10.45-160000.2.2.x86_64.rpm [done] +. +Preloading: libltdl7-2.4.7-160000.2.2.x86_64.rpm [done] +. +Preloading: python313-mysqlclient-2.2.7-160000.2.2.x86_64.rpm [done] +. +Preloading: libodbc2-2.3.12-160000.2.2.x86_64.rpm [done] +. +Preloading: mariadb-client-11.8.5-160000.3.1.x86_64.rpm [done] +. +Preloading: mariadb-11.8.5-160000.3.1.x86_64.rpm [done] +. +Preloading: mariadb-errormessages-11.8.5-160000.3.1.noarch.rpm [done] +. +Preloading: libJudy1-1.0.5-160000.3.2.x86_64.rpm [done] +.done] +Retrieving: libJudy1-1.0.5-160000.3.2.x86_64 (repo-oss (16.0)) (1/8), 110.7 KiB +Retrieving: libltdl7-2.4.7-160000.2.2.x86_64 (repo-oss (16.0)) (2/8), 44.1 KiB +Retrieving: libpcre2-posix3-10.45-160000.2.2.x86_64 (repo-oss (16.0)) (3/8), 66.6 KiB +Retrieving: mariadb-errormessages-11.8.5-160000.3.1.noarch (repo-oss (16.0)) (4/8), 343.9 KiB +Retrieving: libodbc2-2.3.12-160000.2.2.x86_64 (repo-oss (16.0)) (5/8), 202.5 KiB +Retrieving: mariadb-client-11.8.5-160000.3.1.x86_64 (repo-oss (16.0)) (6/8), 1.5 MiB +Retrieving: python313-mysqlclient-2.2.7-160000.2.2.x86_64 (repo-oss (16.0)) (7/8), 119.0 KiB +Retrieving: mariadb-11.8.5-160000.3.1.x86_64 (repo-oss (16.0)) (8/8), 23.5 MiB + +Checking for file conflicts: [...done] +(1/8) Installing: libJudy1-1.0.5-160000.3.2.x86_64 [..done] +(2/8) Installing: libltdl7-2.4.7-160000.2.2.x86_64 [..done] +(3/8) Installing: libpcre2-posix3-10.45-160000.2.2.x86_64 [..done] +(4/8) Installing: mariadb-errormessages-11.8.5-160000.3.1.noarch [..done] +(5/8) Installing: libodbc2-2.3.12-160000.2.2.x86_64 [..done] +(6/8) Installing: mariadb-client-11.8.5-160000.3.1.x86_64 [.. +/usr/bin/systemd-sysusers --replace=/usr/lib/sysusers.d/mysql-user.conf - +Creating group 'mysql' with GID 60. +Creating user 'mysql' (MySQL database admin) with UID 60 and GID 60. +..done] +(7/8) Installing: python313-mysqlclient-2.2.7-160000.2.2.x86_64 [..done] +(8/8) Installing: mariadb-11.8.5-160000.3.1.x86_64 [..................done] +Running post-transaction scripts [.....done] +Update notifications were received from the following packages: +mariadb-11.8.5-160000.3.1.x86_64 (/var/adm/update-messages/mariadb-11.8.5-160000.3.1-something) +View the notifications now? [y/n] (n): n +Created symlink '/etc/systemd/system/mysql.service' → '/usr/lib/systemd/system/mariadb.service'. +Created symlink '/etc/systemd/system/multi-user.target.wants/mariadb.service' → '/usr/lib/systemd/system/mariadb.service'. +[INFO] MariaDB instalado y en ejecución +[INFO] 3. Instalando PHP 8 y módulo Apache... +Retrieving repository 'php 8.0 (SLE_15_SP6)' metadata [... +Looking for gpg keys in repository php 8.0 (SLE_15_SP6). + gpgkey=https://download.opensuse.org/repositories/devel:/languages:/php:/php80/SLE_15_SP6/repodata/repomd.xml.key +... + +Automatically trusting the following key: + + Repository: php 8.0 (SLE_15_SP6) + Key Fingerprint: E1E2 F102 BC77 314F 4A4B 7542 BED0 FF75 7D17 C956 + Key Name: devel:languages:php OBS Project + Key Algorithm: RSA 4096 + Key Created: Thu May 2 07:49:48 2024 + Key Expires: Sat Jul 11 07:49:47 2026 + Rpm Name: gpg-pubkey-7d17c956-6633459c + + + + Note: A GPG pubkey is clearly identified by its fingerprint. Do not rely on the key's name. If + you are not sure whether the presented key is authentic, ask the repository provider or check + their web site. Many providers maintain a web page showing the fingerprints of the GPG keys they + are using. +..done] +Building repository 'php 8.0 (SLE_15_SP6)' cache [....done] +Repository 'repo-openh264 (16.0)' is up to date. +Repository 'repo-oss (16.0)' is up to date. +All repositories have been refreshed. +Refreshing service 'openSUSE'. +Loading repository data... +Reading installed packages... +Resolving package dependencies... + +The following 11 recommended packages were automatically selected: + apache2-utils php8-ctype php8-dom php8-iconv php8-openssl php8-sqlite php8-tokenizer php8-xmlreader php8-xmlwriter postfix w3m + +The following 4 packages are suggested, but will not be installed: + php8-cli php8-gd php8-gettext php8-mbstring + +The following 32 NEW packages are going to be installed: + apache2 apache2-mod_php8 apache2-prefork apache2-utils ed git-web libapr-util1-0 libapr1-0 libargon2-1 libbrotlienc1 libgc1 libicu77 libicu77-ledata liblmdb-0_9_30 perl-CGI perl-Error perl-Git php8 php8-ctype php8-dom php8-iconv php8-mysql php8-openssl php8-pdo php8-sqlite php8-tokenizer php8-xmlreader php8-xmlwriter postfix system-user-wwwrun w3m which + +32 new packages to install. + +Package download size: 23.5 MiB + +Package install size change: + | 64.9 MiB required by packages that will be installed + 64.9 MiB | - 0 B released by packages that will be removed + +Backend: classic_rpmtrans +Continue? [y/n/v/...? shows all options] (y): y +Preloading Packages [.. +Preloading: php8-tokenizer-8.4.16-160000.1.1.x86_64.rpm [done] +. +Preloading: php8-xmlreader-8.4.16-160000.1.1.x86_64.rpm [done] +. +Preloading: php8-xmlwriter-8.4.16-160000.1.1.x86_64.rpm [done] +. +Preloading: php8-mysql-8.4.16-160000.1.1.x86_64.rpm [done] +. +Preloading: php8-pdo-8.4.16-160000.1.1.x86_64.rpm [done] +. +Preloading: php8-sqlite-8.4.16-160000.1.1.x86_64.rpm [done] +. +Preloading: php8-iconv-8.4.16-160000.1.1.x86_64.rpm [done] +. +Preloading: php8-openssl-8.4.16-160000.1.1.x86_64.rpm [done] +. +Preloading: php8-ctype-8.4.16-160000.1.1.x86_64.rpm [done] +. +Preloading: php8-dom-8.4.16-160000.1.1.x86_64.rpm [done] +. +Preloading: apache2-2.4.63-160000.3.1.x86_64.rpm [done] +. +Preloading: php8-8.4.16-160000.1.1.x86_64.rpm [done] +. +Preloading: git-web-2.51.0-160000.1.2.x86_64.rpm [done] +. +Preloading: apache2-utils-2.4.63-160000.3.1.x86_64.rpm [done] +. +Preloading: apache2-prefork-2.4.63-160000.3.1.x86_64.rpm [done] +. +Preloading: apache2-mod_php8-8.4.16-160000.1.1.x86_64.rpm [done] +. +Preloading: postfix-3.10.2-160000.2.2.x86_64.rpm [done] +. +Preloading: perl-Git-2.51.0-160000.1.2.x86_64.rpm [done] +. +Preloading: ed-1.21.1-160000.2.2.x86_64.rpm [done] +. +Preloading: which-2.23-160000.2.2.x86_64.rpm [done] +. +Preloading: system-user-wwwrun-20170617-160000.2.2.noarch.rpm [done] +. +Preloading: perl-Error-0.170.300-160000.2.2.noarch.rpm [done] +. +Preloading: liblmdb-0_9_30-0.9.30-160000.3.2.x86_64.rpm [done] +. +Preloading: perl-CGI-4.670.0-160000.2.2.noarch.rpm [done] +. +Preloading: w3m-0.5.3+git20230121-160000.2.2.x86_64.rpm [done] +. +Preloading: libicu77-77.1-160000.2.2.x86_64.rpm [done] +. +Preloading: libgc1-8.2.8-160000.2.2.x86_64.rpm [done] +. +Preloading: libbrotlienc1-1.1.0-160000.2.2.x86_64.rpm [done] +. +Preloading: libargon2-1-20190702-160000.2.2.x86_64.rpm [done] +. +Preloading: libapr1-0-1.7.5-160000.2.2.x86_64.rpm [done] +.. +Preloading: libicu77-ledata-77.1-160000.2.2.noarch.rpm [done] +. +Preloading: libapr-util1-0-1.6.3-160000.2.2.x86_64.rpm [done] +.done] +Retrieving: ed-1.21.1-160000.2.2.x86_64 (repo-oss (16.0)) (1/32), 85.9 KiB +Retrieving: libapr1-0-1.7.5-160000.2.2.x86_64 (repo-oss (16.0)) (2/32), 151.3 KiB +Retrieving: libargon2-1-20190702-160000.2.2.x86_64 (repo-oss (16.0)) (3/32), 20.5 KiB +Retrieving: libbrotlienc1-1.1.0-160000.2.2.x86_64 (repo-oss (16.0)) (4/32), 263.6 KiB +Retrieving: libgc1-8.2.8-160000.2.2.x86_64 (repo-oss (16.0)) (5/32), 109.3 KiB +Retrieving: libicu77-ledata-77.1-160000.2.2.noarch (repo-oss (16.0)) (6/32), 8.6 MiB +Retrieving: liblmdb-0_9_30-0.9.30-160000.3.2.x86_64 (repo-oss (16.0)) (7/32), 60.4 KiB +Retrieving: perl-CGI-4.670.0-160000.2.2.noarch (repo-oss (16.0)) (8/32), 221.5 KiB +Retrieving: perl-Error-0.170.300-160000.2.2.noarch (repo-oss (16.0)) (9/32), 42.9 KiB +Retrieving: system-user-wwwrun-20170617-160000.2.2.noarch (repo-oss (16.0)) (10/32), 12.7 KiB +Retrieving: which-2.23-160000.2.2.x86_64 (repo-oss (16.0)) (11/32), 39.5 KiB +Retrieving: libapr-util1-0-1.6.3-160000.2.2.x86_64 (repo-oss (16.0)) (12/32), 123.8 KiB +Retrieving: w3m-0.5.3+git20230121-160000.2.2.x86_64 (repo-oss (16.0)) (13/32), 1.0 MiB +Retrieving: libicu77-77.1-160000.2.2.x86_64 (repo-oss (16.0)) (14/32), 2.1 MiB +Retrieving: perl-Git-2.51.0-160000.1.2.x86_64 (repo-oss (16.0)) (15/32), 302.7 KiB +Retrieving: apache2-utils-2.4.63-160000.3.1.x86_64 (repo-oss (16.0)) (16/32), 588.9 KiB +Retrieving: postfix-3.10.2-160000.2.2.x86_64 (repo-oss (16.0)) (17/32), 1.4 MiB +Retrieving: git-web-2.51.0-160000.1.2.x86_64 (repo-oss (16.0)) (18/32), 350.5 KiB +Retrieving: apache2-prefork-2.4.63-160000.3.1.x86_64 (repo-oss (16.0)) (19/32), 1.8 MiB +Retrieving: apache2-2.4.63-160000.3.1.x86_64 (repo-oss (16.0)) (20/32), 905.9 KiB +Retrieving: php8-8.4.16-160000.1.1.x86_64 (repo-oss (16.0)) (21/32), 281.8 KiB +Retrieving: apache2-mod_php8-8.4.16-160000.1.1.x86_64 (repo-oss (16.0)) (22/32), 2.2 MiB +Retrieving: php8-dom-8.4.16-160000.1.1.x86_64 (repo-oss (16.0)) (23/32), 748.6 KiB +Retrieving: php8-ctype-8.4.16-160000.1.1.x86_64 (repo-oss (16.0)) (24/32), 218.2 KiB +Retrieving: php8-iconv-8.4.16-160000.1.1.x86_64 (repo-oss (16.0)) (25/32), 232.7 KiB +Retrieving: php8-openssl-8.4.16-160000.1.1.x86_64 (repo-oss (16.0)) (26/32), 291.9 KiB +Retrieving: php8-pdo-8.4.16-160000.1.1.x86_64 (repo-oss (16.0)) (27/32), 263.9 KiB +Retrieving: php8-sqlite-8.4.16-160000.1.1.x86_64 (repo-oss (16.0)) (28/32), 252.4 KiB +Retrieving: php8-tokenizer-8.4.16-160000.1.1.x86_64 (repo-oss (16.0)) (29/32), 225.6 KiB +Retrieving: php8-xmlreader-8.4.16-160000.1.1.x86_64 (repo-oss (16.0)) (30/32), 230.6 KiB +Retrieving: php8-xmlwriter-8.4.16-160000.1.1.x86_64 (repo-oss (16.0)) (31/32), 228.2 KiB +Retrieving: php8-mysql-8.4.16-160000.1.1.x86_64 (repo-oss (16.0)) (32/32), 345.5 KiB + +Checking for file conflicts: [...done] +( 1/32) Installing: ed-1.21.1-160000.2.2.x86_64 [..done] +( 2/32) Installing: libapr1-0-1.7.5-160000.2.2.x86_64 [..done] +( 3/32) Installing: libargon2-1-20190702-160000.2.2.x86_64 [..done] +( 4/32) Installing: libbrotlienc1-1.1.0-160000.2.2.x86_64 [..done] +( 5/32) Installing: libgc1-8.2.8-160000.2.2.x86_64 [..done] +( 6/32) Installing: libicu77-ledata-77.1-160000.2.2.noarch [......done] +( 7/32) Installing: liblmdb-0_9_30-0.9.30-160000.3.2.x86_64 [..done] +( 8/32) Installing: perl-CGI-4.670.0-160000.2.2.noarch [..done] +( 9/32) Installing: perl-Error-0.170.300-160000.2.2.noarch [..done] +(10/32) Installing: system-user-wwwrun-20170617-160000.2.2.noarch [.. +/usr/bin/systemd-sysusers --replace=/usr/lib/sysusers.d/system-user-wwwrun.conf - +Creating group 'www' with GID 474. +Creating group 'wwwrun' with GID 473. +Creating user 'wwwrun' (WWW daemon apache) with UID 473 and GID 473. +.done] +(11/32) Installing: which-2.23-160000.2.2.x86_64 [..done] +(12/32) Installing: libapr-util1-0-1.6.3-160000.2.2.x86_64 [..done] +(13/32) Installing: w3m-0.5.3+git20230121-160000.2.2.x86_64 [..done] +(14/32) Installing: libicu77-77.1-160000.2.2.x86_64 [...done] +(15/32) Installing: perl-Git-2.51.0-160000.1.2.x86_64 [..done] +(16/32) Installing: apache2-utils-2.4.63-160000.3.1.x86_64 [..done] +(17/32) Installing: postfix-3.10.2-160000.2.2.x86_64 [.. +/usr/bin/systemd-sysusers --replace=/usr/lib/sysusers.d/postfix-user.conf - +Creating group 'postfix' with GID 51. +Creating group 'maildrop' with GID 59. +Creating user 'postfix' (Postfix Daemon) with UID 51 and GID 51. +. +Updating /etc/sysconfig/postfix ... +Updating /etc/sysconfig/mail ... +Created symlink '/etc/systemd/system/multi-user.target.wants/postfix.service' -> '/usr/lib/systemd/system/postfix.service'. +done] +(18/32) Installing: git-web-2.51.0-160000.1.2.x86_64 [..done] +(19/32) Installing: apache2-prefork-2.4.63-160000.3.1.x86_64 [...done] +(20/32) Installing: apache2-2.4.63-160000.3.1.x86_64 [.... +Please check /etc/permissions.local for settings of /usr/sbin/suexec . +Updating /etc/sysconfig/apache2 ... +done] +(21/32) Installing: php8-8.4.16-160000.1.1.x86_64 [..done] +(22/32) Installing: apache2-mod_php8-8.4.16-160000.1.1.x86_64 [...done] +(23/32) Installing: php8-dom-8.4.16-160000.1.1.x86_64 [..done] +(24/32) Installing: php8-ctype-8.4.16-160000.1.1.x86_64 [..done] +(25/32) Installing: php8-iconv-8.4.16-160000.1.1.x86_64 [..done] +(26/32) Installing: php8-openssl-8.4.16-160000.1.1.x86_64 [..done] +(27/32) Installing: php8-pdo-8.4.16-160000.1.1.x86_64 [..done] +(28/32) Installing: php8-sqlite-8.4.16-160000.1.1.x86_64 [..done] +(29/32) Installing: php8-tokenizer-8.4.16-160000.1.1.x86_64 [..done] +(30/32) Installing: php8-xmlreader-8.4.16-160000.1.1.x86_64 [..done] +(31/32) Installing: php8-xmlwriter-8.4.16-160000.1.1.x86_64 [..done] +(32/32) Installing: php8-mysql-8.4.16-160000.1.1.x86_64 [..done] +Running post-transaction scripts [.......done] +[INFO] PHP instalado +[INFO] 4. Instalando Apache y configurando welcome.php... +Refreshing service 'openSUSE'. +Loading repository data... +Reading installed packages... +'apache2' is already installed. +No update candidate for 'apache2-2.4.63-160000.3.1.x86_64'. The highest available version is already installed. +'apache2-prefork' is already installed. +No update candidate for 'apache2-prefork-2.4.63-160000.3.1.x86_64'. The highest available version is already installed. +Resolving package dependencies... +Nothing to do. +Created symlink '/etc/systemd/system/httpd.service' → '/usr/lib/systemd/system/apache2.service'. +Created symlink '/etc/systemd/system/apache.service' → '/usr/lib/systemd/system/apache2.service'. +Created symlink '/etc/systemd/system/multi-user.target.wants/apache2.service' → '/usr/lib/systemd/system/apache2.service'. +[INFO] Apache instalado y apuntando a /vicidial/welcome.php +[INFO] 4b. Instalando Asterisk (repositorio VICIdial asterisk-18)... +[INFO] Añadiendo repo: home:vicidial:asterisk-18 (16.0)... +Adding repository 'asterisk (16.0)' [.....done] +Repository 'asterisk (16.0)' successfully added + +URI : https://download.opensuse.org/repositories/home:/vicidial:/asterisk-18/16.0/ +Enabled : Yes +GPG Check : Yes +Autorefresh : Yes +Priority : 99 (default priority) + +Repository priorities are without effect. All enabled repositories share the same priority. +[WARN] Repo Asterisk no disponible. Para Leap 16.0 ejecuta manualmente: +[WARN] zypper ar --refresh https://download.opensuse.org/repositories/home:vicidial:asterisk-18/16.0/home:vicidial:asterisk-18.repo +[WARN] zypper --no-gpg-checks ref && zypper in -y asterisk && systemctl enable --now asterisk +[INFO] 5. Ejecutando restore.sh... +[INFO] ========================================== +[INFO] Restauración de Vicibox +[INFO] ========================================== + +[INFO] 1. Restaurando scripts de Vicibox... +[INFO] ✓ Scripts restaurados + +[INFO] 2. Creando enlaces simbólicos... +[INFO] ✓ Enlaces simbólicos creados + +[INFO] 3. Restaurando código fuente de ViciDial... +[INFO] ✓ Código fuente restaurado + +[INFO] 4. Verificando instalación... +[INFO] ✓ Verificación completada sin errores + +[INFO] ========================================== +[INFO] Restauración completada! +[INFO] ========================================== + +[INFO] Ahora puedes ejecutar la instalación: + + Para instalación Express (todo-en-uno): + vicibox-install --vicibox-express + + Para instalación personalizada: + vicibox-install + +[INFO] 6. Aplicando parches a vicibox-install.pl (socket MySQL, random_pass, etc.)... +[INFO] Copiado vicibox-install.pl con parches desde patches/ +[INFO] 7. Ejecutando vicibox-install --vicibox-express (confirmación automática 'y')... +[INFO] Esto puede tardar varios minutos... + + +ViciBox Installer + +Vicibox Express mode activated +Can't exec "/usr/sbin/asterisk": No such file or directory at /usr/share/vicibox/vicibox-install.pl line 803. +Use of uninitialized value $string in substitution (s///) at /usr/share/vicibox/vicibox-install.pl line 137. +Use of uninitialized value $string in substitution (s///) at /usr/share/vicibox/vicibox-install.pl line 138. +Use of uninitialized value in split at /usr/share/vicibox/vicibox-install.pl line 803. +Use of uninitialized value $string in substitution (s///) at /usr/share/vicibox/vicibox-install.pl line 137. +Use of uninitialized value $string in substitution (s///) at /usr/share/vicibox/vicibox-install.pl line 138. +Use of uninitialized value $astverstring in pattern match (m//) at /usr/share/vicibox/vicibox-install.pl line 805. +Use of uninitialized value $astverstring in pattern match (m//) at /usr/share/vicibox/vicibox-install.pl line 806. +Use of uninitialized value $astverstring in pattern match (m//) at /usr/share/vicibox/vicibox-install.pl line 807. +Use of uninitialized value $astverstring in pattern match (m//) at /usr/share/vicibox/vicibox-install.pl line 808. +Use of uninitialized value $astverstring in pattern match (m//) at /usr/share/vicibox/vicibox-install.pl line 809. +Use of uninitialized value $astverstring in pattern match (m//) at /usr/share/vicibox/vicibox-install.pl line 810. +sh: line 1: /usr/bin/svn: No such file or directory +Use of uninitialized value $string in substitution (s///) at /usr/share/vicibox/vicibox-install.pl line 137. +Use of uninitialized value $string in substitution (s///) at /usr/share/vicibox/vicibox-install.pl line 138. +sh: line 1: /usr/bin/svn: No such file or directory +Use of uninitialized value $string in substitution (s///) at /usr/share/vicibox/vicibox-install.pl line 137. +Use of uninitialized value $string in substitution (s///) at /usr/share/vicibox/vicibox-install.pl line 138. + +This will install ViciBox in "Express" mode. This will result in a +single server installation performing all roles of the ViciDial Call +Center Suite. This is the simplest method of installation and generally +suitable for use with 20 agents or less. Minimum server specifications +are Quad-Core CPU, 8GB of ram or more, and two 500-GB SSDs in RAID1. A +software RAID can be setup by using the MD or MultiDevice install media +for ViciBox. + +To continue beyond this point will be destructive to the installed system. + + +Do you want to continue with the ViciBox Express install? [y/N] : + +Beginning installation, expect lots of output... + +Local SVN revision matches DB revision: 0 +Doing general DataBase requirements... +Doing Master-specific MySQL setup... +Configuring Web Server... +/usr/bin/sed: can't read /etc/apache2/conf.d/audiostore.conf: No such file or directory +Configuring Telephony Server... +Use of uninitialized value $astverstring in concatenation (.) or string at /usr/share/vicibox/vicibox-install.pl line 468, line 1. +Can't exec "/usr/bin/crontab": No such file or directory at /usr/share/vicibox/vicibox-install.pl line 596, line 1. +Can't exec "/usr/bin/crontab": No such file or directory at /usr/share/vicibox/vicibox-install.pl line 597, line 1. +Loading GMT and Phone Codes... +/usr/bin/sed: can't read /etc/asterisk/pjsip.conf: No such file or directory +/usr/bin/sed: can't read /etc/asterisk/pjsip.conf: No such file or directory + +Seeding the audio store, this may take a while... + + +PLEASE use secure passwords inside vicidial. It prevents hackers +and other undesirables from compromising your system and costing +you thousands in toll fraud and long distance. A secure password +Contains at least one capital letter and one number. A good example +of a secure password would be VSBBIePW9Juu0XT. + +Don't feed the black market, secure your systems properly! + +System should be installed. Please type 'reboot' to cleanly load everything. +[INFO] 8. Configuración: VARDB_server => 127.0.0.1 en /etc/astguiclient.conf (para la web) +[INFO] 9. Creando usuario administrador sapian en ViciDial... +La base de datos asterisk no existe o no hay acceso. Ejecutar después de la instalación Express. +[WARN] No se pudo crear el usuario (¿base de datos ya instalada?). Puedes ejecutar después: sudo /home/backvicibox3/create-admin-sapian.sh +[INFO] ========================================== +[INFO] Proceso de instalación finalizado +[INFO] ========================================== +[INFO] Log guardado en: /home/backvicibox3/install-vicibox.log +[INFO] Comprueba el estado de servicios: systemctl status mariadb apache2 asterisk +[INFO] Acceso web: http:///vicidial/welcome.php +[INFO] Admin ViciDial: usuario sapian, password sap64adm (admin.php) +[INFO] ========================================== +[INFO] Instalación ViciBox (dependencias + restore + express) +[INFO] ========================================== +[INFO] 0. Instalando módulos Perl requeridos (perl-DBI, perl-DBD-mysql, perl-libwww-perl)... +Refreshing service 'openSUSE'. +Retrieving repository 'asterisk (16.0)' metadata [... +Looking for gpg keys in repository asterisk (16.0). + gpgkey=https://download.opensuse.org/repositories/home:/vicidial:/asterisk-18/16.0/repodata/repomd.xml.key +... + +New repository or package signing key received: + + Repository: asterisk (16.0) + Key Fingerprint: 5559 D26A 181B 440B 9224 982F 0769 727B F189 E8B9 + Key Name: home:vicidial OBS Project + Key Algorithm: RSA 2048 + Key Created: Mon Feb 2 13:49:16 2026 + Key Expires: Wed Apr 12 13:49:16 2028 + Rpm Name: gpg-pubkey-f189e8b9-6980ab5c + + + + Note: Signing data enables the recipient to verify that no modifications occurred after the data + were signed. Accepting data with no, wrong or unknown signature can lead to a corrupted system + and in extreme cases even to a system compromise. + + Note: A GPG pubkey is clearly identified by its fingerprint. Do not rely on the key's name. If + you are not sure whether the presented key is authentic, ask the repository provider or check + their web site. Many providers maintain a web page showing the fingerprints of the GPG keys they + are using. + +Do you want to reject the key, trust temporarily, or trust always? [r/t/a/?] (r): r +error] +Repository 'asterisk (16.0)' is invalid. +[home_vicidial_asterisk-18|https://download.opensuse.org/repositories/home:/vicidial:/asterisk-18/16.0/] Failed to retrieve new repository metadata. +History: + - Signature verification failed for repomd.xml +Please check if the URIs defined for this repository are pointing to a valid repository. +Warning: Skipping repository 'asterisk (16.0)' because of the above error. +Some of the repositories have not been refreshed because of an error. +Loading repository data... +Reading installed packages... +'perl-DBD-mysql' is already installed. +No update candidate for 'perl-DBD-mysql-4.050-160000.2.2.x86_64'. The highest available version is already installed. +'perl-libwww-perl' is already installed. +No update candidate for 'perl-libwww-perl-6.770.0-160000.2.2.noarch'. The highest available version is already installed. +'perl-DBI' is already installed. +No update candidate for 'perl-DBI-1.647.0-160000.2.2.x86_64'. The highest available version is already installed. +Resolving package dependencies... +Nothing to do. +[INFO] perl-DBI, perl-DBD-mysql, perl-libwww-perl instalados +[INFO] 1. Instalando Perl, perl-libwww-perl, Subversion y cronie... +Refreshing service 'openSUSE'. +Retrieving repository 'asterisk (16.0)' metadata [... +Looking for gpg keys in repository asterisk (16.0). + gpgkey=https://download.opensuse.org/repositories/home:/vicidial:/asterisk-18/16.0/repodata/repomd.xml.key +... + +New repository or package signing key received: + + Repository: asterisk (16.0) + Key Fingerprint: 5559 D26A 181B 440B 9224 982F 0769 727B F189 E8B9 + Key Name: home:vicidial OBS Project + Key Algorithm: RSA 2048 + Key Created: Mon Feb 2 13:49:16 2026 + Key Expires: Wed Apr 12 13:49:16 2028 + Rpm Name: gpg-pubkey-f189e8b9-6980ab5c + + + + Note: Signing data enables the recipient to verify that no modifications occurred after the data + were signed. Accepting data with no, wrong or unknown signature can lead to a corrupted system + and in extreme cases even to a system compromise. + + Note: A GPG pubkey is clearly identified by its fingerprint. Do not rely on the key's name. If + you are not sure whether the presented key is authentic, ask the repository provider or check + their web site. Many providers maintain a web page showing the fingerprints of the GPG keys they + are using. + +Do you want to reject the key, trust temporarily, or trust always? [r/t/a/?] (r): r +error] +Repository 'asterisk (16.0)' is invalid. +[home_vicidial_asterisk-18|https://download.opensuse.org/repositories/home:/vicidial:/asterisk-18/16.0/] Failed to retrieve new repository metadata. +History: + - Signature verification failed for repomd.xml +Please check if the URIs defined for this repository are pointing to a valid repository. +Warning: Skipping repository 'asterisk (16.0)' because of the above error. +Some of the repositories have not been refreshed because of an error. +Loading repository data... +Reading installed packages... +'perl' is already installed. +No update candidate for 'perl-5.42.0-160000.2.2.x86_64'. The highest available version is already installed. +'perl-DBD-mysql' is already installed. +No update candidate for 'perl-DBD-mysql-4.050-160000.2.2.x86_64'. The highest available version is already installed. +'perl-libwww-perl' is already installed. +No update candidate for 'perl-libwww-perl-6.770.0-160000.2.2.noarch'. The highest available version is already installed. +'perl-DBI' is already installed. +No update candidate for 'perl-DBI-1.647.0-160000.2.2.x86_64'. The highest available version is already installed. +Resolving package dependencies... + +The following package is suggested, but will not be installed: + mailx + +The following 7 NEW packages are going to be installed: + cron cronie debianutils libdb-4_8 libserf-1-1 libutf8proc3 subversion + +7 new packages to install. + +Package download size: 4.2 MiB + +Package install size change: + | 14.1 MiB required by packages that will be installed + 14.1 MiB | - 0 B released by packages that will be removed + +Backend: classic_rpmtrans +Continue? [y/n/v/...? shows all options] (y): y +Preloading Packages [.. +Preloading: cron-4.2-160000.2.2.x86_64.rpm [done] +. +Preloading: cronie-1.7.2-160000.2.2.x86_64.rpm [done] +. +Preloading: libutf8proc3-2.10.0-160000.2.2.x86_64.rpm [done] +. +Preloading: libserf-1-1-1.3.10-bp160.1.13.x86_64.rpm [done] +. +Preloading: libdb-4_8-4.8.30-160000.2.2.x86_64.rpm [done] +. +Preloading: subversion-1.14.5-bp160.1.12.x86_64.rpm [done] +. +Preloading: debianutils-5.4-160000.2.2.x86_64.rpm [done] +.done] +Retrieving: debianutils-5.4-160000.2.2.x86_64 (repo-oss (16.0)) (1/7), 23.8 KiB +Retrieving: libdb-4_8-4.8.30-160000.2.2.x86_64 (repo-oss (16.0)) (2/7), 819.8 KiB +Retrieving: libserf-1-1-1.3.10-bp160.1.13.x86_64 (repo-oss (16.0)) (3/7), 79.7 KiB +Retrieving: libutf8proc3-2.10.0-160000.2.2.x86_64 (repo-oss (16.0)) (4/7), 83.6 KiB +Retrieving: cron-4.2-160000.2.2.x86_64 (repo-oss (16.0)) (5/7), 38.1 KiB +Retrieving: cronie-1.7.2-160000.2.2.x86_64 (repo-oss (16.0)) (6/7), 148.5 KiB +Retrieving: subversion-1.14.5-bp160.1.12.x86_64 (repo-oss (16.0)) (7/7), 3.0 MiB + +Checking for file conflicts: [..done] +(1/7) Installing: debianutils-5.4-160000.2.2.x86_64 [..done] +(2/7) Installing: libdb-4_8-4.8.30-160000.2.2.x86_64 [..done] +(3/7) Installing: libserf-1-1-1.3.10-bp160.1.13.x86_64 [..done] +(4/7) Installing: libutf8proc3-2.10.0-160000.2.2.x86_64 [..done] +(5/7) Installing: cron-4.2-160000.2.2.x86_64 [..done] +(6/7) Installing: cronie-1.7.2-160000.2.2.x86_64 [.. +/usr/bin/crontab: setting to root:trusted 4755 (wrong permissions 4750) +Updating /etc/sysconfig/cron ... +Created symlink '/etc/systemd/system/multi-user.target.wants/cron.service' -> '/usr/lib/systemd/system/cron.service'. +done] +(7/7) Installing: subversion-1.14.5-bp160.1.12.x86_64 [.. +/usr/bin/systemd-sysusers --replace=/usr/lib/sysusers.d/system-user-svn.conf - +Creating group 'svn' with GID 472. +Creating user 'svn' (user for Apache Subversion svnserve) with UID 472 and GID 472. +.. +Updating /etc/sysconfig/svnserve ... +done] +Running post-transaction scripts [.....done] +[INFO] ========================================== +[INFO] Instalación ViciBox (dependencias + restore + express) +[INFO] ========================================== +[INFO] 0. Instalando módulos Perl requeridos (perl-DBI, perl-DBD-mysql, perl-libwww-perl)... +Refreshing service 'openSUSE'. +Retrieving repository 'asterisk (16.0)' metadata [... +Looking for gpg keys in repository asterisk (16.0). + gpgkey=https://download.opensuse.org/repositories/home:/vicidial:/asterisk-18/16.0/repodata/repomd.xml.key +... + +New repository or package signing key received: + + Repository: asterisk (16.0) + Key Fingerprint: 5559 D26A 181B 440B 9224 982F 0769 727B F189 E8B9 + Key Name: home:vicidial OBS Project + Key Algorithm: RSA 2048 + Key Created: Mon Feb 2 13:49:16 2026 + Key Expires: Wed Apr 12 13:49:16 2028 + Rpm Name: gpg-pubkey-f189e8b9-6980ab5c + + + + Note: Signing data enables the recipient to verify that no modifications occurred after the data + were signed. Accepting data with no, wrong or unknown signature can lead to a corrupted system + and in extreme cases even to a system compromise. + + Note: A GPG pubkey is clearly identified by its fingerprint. Do not rely on the key's name. If + you are not sure whether the presented key is authentic, ask the repository provider or check + their web site. Many providers maintain a web page showing the fingerprints of the GPG keys they + are using. + +Do you want to reject the key, trust temporarily, or trust always? [r/t/a/?] (r): r +error] +Repository 'asterisk (16.0)' is invalid. +[home_vicidial_asterisk-18|https://download.opensuse.org/repositories/home:/vicidial:/asterisk-18/16.0/] Failed to retrieve new repository metadata. +History: + - Signature verification failed for repomd.xml +Please check if the URIs defined for this repository are pointing to a valid repository. +Warning: Skipping repository 'asterisk (16.0)' because of the above error. +Some of the repositories have not been refreshed because of an error. +Loading repository data... +Reading installed packages... +'perl-DBD-mysql' is already installed. +No update candidate for 'perl-DBD-mysql-4.050-160000.2.2.x86_64'. The highest available version is already installed. +'perl-libwww-perl' is already installed. +No update candidate for 'perl-libwww-perl-6.770.0-160000.2.2.noarch'. The highest available version is already installed. +'perl-DBI' is already installed. +No update candidate for 'perl-DBI-1.647.0-160000.2.2.x86_64'. The highest available version is already installed. +Resolving package dependencies... +Nothing to do. +[INFO] perl-DBI, perl-DBD-mysql, perl-libwww-perl instalados +[INFO] 1. Instalando Perl, perl-libwww-perl, Subversion y cronie... +Refreshing service 'openSUSE'. +Retrieving repository 'asterisk (16.0)' metadata [... +Looking for gpg keys in repository asterisk (16.0). + gpgkey=https://download.opensuse.org/repositories/home:/vicidial:/asterisk-18/16.0/repodata/repomd.xml.key +... + +New repository or package signing key received: + + Repository: asterisk (16.0) + Key Fingerprint: 5559 D26A 181B 440B 9224 982F 0769 727B F189 E8B9 + Key Name: home:vicidial OBS Project + Key Algorithm: RSA 2048 + Key Created: Mon Feb 2 13:49:16 2026 + Key Expires: Wed Apr 12 13:49:16 2028 + Rpm Name: gpg-pubkey-f189e8b9-6980ab5c + + + + Note: Signing data enables the recipient to verify that no modifications occurred after the data + were signed. Accepting data with no, wrong or unknown signature can lead to a corrupted system + and in extreme cases even to a system compromise. + + Note: A GPG pubkey is clearly identified by its fingerprint. Do not rely on the key's name. If + you are not sure whether the presented key is authentic, ask the repository provider or check + their web site. Many providers maintain a web page showing the fingerprints of the GPG keys they + are using. + +Do you want to reject the key, trust temporarily, or trust always? [r/t/a/?] (r): r +error] +Repository 'asterisk (16.0)' is invalid. +[home_vicidial_asterisk-18|https://download.opensuse.org/repositories/home:/vicidial:/asterisk-18/16.0/] Failed to retrieve new repository metadata. +History: + - Signature verification failed for repomd.xml +Please check if the URIs defined for this repository are pointing to a valid repository. +Warning: Skipping repository 'asterisk (16.0)' because of the above error. +Some of the repositories have not been refreshed because of an error. +Loading repository data... +Reading installed packages... +'perl' is already installed. +No update candidate for 'perl-5.42.0-160000.2.2.x86_64'. The highest available version is already installed. +'subversion' is already installed. +No update candidate for 'subversion-1.14.5-bp160.1.12.x86_64'. The highest available version is already installed. +'perl-DBD-mysql' is already installed. +No update candidate for 'perl-DBD-mysql-4.050-160000.2.2.x86_64'. The highest available version is already installed. +'perl-libwww-perl' is already installed. +No update candidate for 'perl-libwww-perl-6.770.0-160000.2.2.noarch'. The highest available version is already installed. +'cronie' is already installed. +No update candidate for 'cronie-1.7.2-160000.2.2.x86_64'. The highest available version is already installed. +'perl-DBI' is already installed. +No update candidate for 'perl-DBI-1.647.0-160000.2.2.x86_64'. The highest available version is already installed. +Resolving package dependencies... +Nothing to do. diff --git a/Custom/backvicibox3/install-vicibox.sh b/Custom/backvicibox3/install-vicibox.sh index 0cd6c13..ff0533d 100644 --- a/Custom/backvicibox3/install-vicibox.sh +++ b/Custom/backvicibox3/install-vicibox.sh @@ -28,6 +28,12 @@ if [ "$EUID" -ne 0 ]; then exit 1 fi +# zypper: --gpg-auto-import-keys evita el prompt "reject/trust" en repos OBS (ej. Asterisk). +# Si en una sesión manual pulsas "r" (reject), el repo queda inválido hasta borrarlo y volver a añadirlo: +# zypper rr home_vicidial_asterisk-18 +# zypper --gpg-auto-import-keys ar --refresh 'https://download.opensuse.org/repositories/home:/vicidial:/asterisk-18/16.0/home:vicidial:asterisk-18.repo' +# zypper refresh && zypper in -y asterisk + # Comprobar que estamos en backvicibox y existen archivos if [ ! -f "${SCRIPT_DIR}/restore.sh" ]; then error "No se encuentra restore.sh. Ejecutar desde el directorio backvicibox." @@ -45,19 +51,22 @@ echo "" # --- 0. Módulos Perl (antes que todo) --- info "0. Instalando módulos Perl requeridos (perl-DBI, perl-DBD-mysql, perl-libwww-perl)..." -zypper -n install -y perl-DBI perl-DBD-mysql perl-libwww-perl >> "$LOG_FILE" 2>&1 || true +zypper --gpg-auto-import-keys -n install -y perl-DBI perl-DBD-mysql perl-libwww-perl >> "$LOG_FILE" 2>&1 || true info " perl-DBI, perl-DBD-mysql, perl-libwww-perl instalados" echo "" -# --- 1. Perl (versión del sistema) y resto de módulos --- -info "1. Instalando Perl, Subversion y resto de dependencias..." -zypper -n install -y perl perl-DBI perl-DBD-mysql libwww-perl subversion >> "$LOG_FILE" 2>&1 || true +# --- 1. Perl (versión del sistema), LWP, Subversion y cron (crontab) --- +# En openSUSE el paquete es perl-libwww-perl, no libwww-perl (Debian). +info "1. Instalando Perl, perl-libwww-perl, Subversion y cronie..." +zypper --gpg-auto-import-keys -n install -y perl perl-DBI perl-DBD-mysql perl-libwww-perl subversion cronie >> "$LOG_FILE" 2>&1 +systemctl enable cron >> "$LOG_FILE" 2>&1 || systemctl enable crond >> "$LOG_FILE" 2>&1 || true +systemctl start cron >> "$LOG_FILE" 2>&1 || systemctl start crond >> "$LOG_FILE" 2>&1 || true info " Perl: $(perl -v 2>&1 | head -1)" echo "" # --- 2. MariaDB --- info "2. Instalando MariaDB..." -zypper -n install -y mariadb mariadb-client >> "$LOG_FILE" 2>&1 +zypper --gpg-auto-import-keys -n install -y mariadb mariadb-client >> "$LOG_FILE" 2>&1 systemctl enable mariadb >> "$LOG_FILE" 2>&1 systemctl start mariadb >> "$LOG_FILE" 2>&1 info " MariaDB instalado y en ejecución" @@ -66,16 +75,16 @@ echo "" # --- 3. PHP 8 y módulo Apache --- info "3. Instalando PHP 8 y módulo Apache..." if ! zypper lr | grep -q "devel_languages_php_php80"; then - zypper -n addrepo https://download.opensuse.org/repositories/devel:languages:php:php80/SLE_15_SP6/devel:languages:php:php80.repo + zypper --gpg-auto-import-keys -n addrepo https://download.opensuse.org/repositories/devel:languages:php:php80/SLE_15_SP6/devel:languages:php:php80.repo fi -zypper --no-gpg-checks -n refresh >> "$LOG_FILE" 2>&1 -zypper -n install -y php8 apache2-mod_php8 php8-mysql >> "$LOG_FILE" 2>&1 +zypper --gpg-auto-import-keys --no-gpg-checks -n refresh >> "$LOG_FILE" 2>&1 +zypper --gpg-auto-import-keys -n install -y php8 apache2-mod_php8 php8-mysql >> "$LOG_FILE" 2>&1 info " PHP $(php8 -v 2>/dev/null | head -1 || true) instalado" echo "" # --- 4. Apache --- info "4. Instalando Apache y configurando welcome.php..." -zypper -n install -y apache2 apache2-prefork >> "$LOG_FILE" 2>&1 +zypper --gpg-auto-import-keys -n install -y apache2 apache2-prefork >> "$LOG_FILE" 2>&1 # Configurar que la raíz y /vicidial apunten a welcome.php cat > /etc/apache2/conf.d/vicidial-welcome.conf << 'APACHECONF' # ViciDial: URL principal -> vicidial/welcome.php @@ -91,40 +100,60 @@ APACHECONF systemctl enable apache2 >> "$LOG_FILE" 2>&1 systemctl start apache2 >> "$LOG_FILE" 2>&1 info " Apache instalado y apuntando a /vicidial/welcome.php" +# SELinux: sin esto mysqli falla con "Permission denied" al conectar a MariaDB (PHP bajo Apache) +if command -v getenforce >/dev/null 2>&1 && [ "$(getenforce 2>/dev/null)" = "Enforcing" ]; then + setsebool -P httpd_can_network_connect_db 1 >> "$LOG_FILE" 2>&1 || true + setsebool -P httpd_can_network_connect 1 >> "$LOG_FILE" 2>&1 || true + info " SELinux: permitida conexión Apache→MariaDB (httpd_can_network_connect*)" +fi +# Evita warning PCRE JIT bajo restricciones de memoria ejecutable +for PHPINI in /etc/php8/apache2/php.ini /etc/php7/apache2/php.ini; do + if [ -f "$PHPINI" ]; then + sed -i 's/^;\?pcre\.jit=.*/pcre.jit=0/' "$PHPINI" + systemctl reload apache2 >> "$LOG_FILE" 2>&1 || true + break + fi +done echo "" # --- 4b. Asterisk (requerido por vicibox-install; el instalador no lo instala) --- +# OBS usa rutas con barras: home:/vicidial:/asterisk-18 (no home:vicidial:... sin barras). info "4b. Instalando Asterisk (repositorio VICIdial asterisk-18)..." -AST_REPO_NAME="home:vicidial:asterisk-18" -AST_REPO_URL="https://download.opensuse.org/repositories/${AST_REPO_NAME}" -# Detectar versión (ej. 16.0 en openSUSE Leap 16.0) +AST_REPO_FILE="home:vicidial:asterisk-18.repo" +AST_REPO_BASE="https://download.opensuse.org/repositories/home:/vicidial:/asterisk-18" AST_OS_VER="" [ -f /etc/os-release ] && AST_OS_VER=$(grep -E '^VERSION_ID=' /etc/os-release | cut -d'"' -f2) -# Probar versión del sistema primero; luego 16.0, 15.6, 15.5 AST_VERSIONS="$AST_OS_VER 16.0 15.6 15.5" AST_REPO_ADDED=0 for AST_VER in $AST_VERSIONS; do [ -z "$AST_VER" ] && continue - if zypper lr 2>/dev/null | grep -q "$AST_REPO_NAME"; then + if zypper lr 2>/dev/null | grep -qiE 'vicidial|asterisk-18'; then + AST_REPO_ADDED=1 + break + fi + REPO_URL="${AST_REPO_BASE}/${AST_VER}/${AST_REPO_FILE}" + info " Probando repositorio Asterisk (${AST_VER}): ${REPO_URL}" + if zypper --gpg-auto-import-keys -n addrepo --refresh "$REPO_URL" >> "$LOG_FILE" 2>&1; then AST_REPO_ADDED=1 break fi - info " Añadiendo repo: ${AST_REPO_NAME} (${AST_VER})..." - zypper -n addrepo --refresh "${AST_REPO_URL}/${AST_VER}/${AST_REPO_NAME}.repo" >> "$LOG_FILE" 2>&1 && AST_REPO_ADDED=1 && break done -if [ "$AST_REPO_ADDED" = "1" ] && zypper lr 2>/dev/null | grep -q "$AST_REPO_NAME"; then +if [ "$AST_REPO_ADDED" = "1" ]; then info " Refrescando repositorios..." - zypper --no-gpg-checks -n refresh >> "$LOG_FILE" 2>&1 + zypper --gpg-auto-import-keys --no-gpg-checks -n refresh >> "$LOG_FILE" 2>&1 info " Instalando asterisk..." - zypper -n install -y asterisk >> "$LOG_FILE" 2>&1 - info " Habilitando e iniciando asterisk..." - systemctl enable asterisk >> "$LOG_FILE" 2>&1 - systemctl start asterisk >> "$LOG_FILE" 2>&1 || true - info " Asterisk: $(asterisk -V 2>/dev/null || echo 'revisar servicio')" + if zypper --gpg-auto-import-keys -n install -y asterisk >> "$LOG_FILE" 2>&1; then + info " Habilitando e iniciando asterisk..." + systemctl enable asterisk >> "$LOG_FILE" 2>&1 + systemctl start asterisk >> "$LOG_FILE" 2>&1 || true + info " Asterisk: $(asterisk -V 2>/dev/null || echo 'revisar servicio')" + else + warn " zypper no pudo instalar el paquete asterisk. Revisa red/repos en install-vicibox.log" + fi else - warn " Repo Asterisk no disponible. Para Leap 16.0 ejecuta manualmente:" - warn " zypper ar --refresh ${AST_REPO_URL}/16.0/${AST_REPO_NAME}.repo" - warn " zypper --no-gpg-checks ref && zypper in -y asterisk && systemctl enable --now asterisk" + warn " No se pudo añadir el repo Asterisk. Manual (Leap 16.0):" + warn " zypper ar --refresh ${AST_REPO_BASE}/16.0/${AST_REPO_FILE}" + warn " zypper --gpg-auto-import-keys --no-gpg-checks ref && zypper in -y asterisk && systemctl enable --now asterisk" fi echo "" @@ -134,6 +163,21 @@ cd "$SCRIPT_DIR" ./restore.sh >> "$LOG_FILE" 2>&1 echo "" +# --- 5b. Propietario Apache y SELinux RW (evita 500 en admin.php: unlink/fopen) --- +info "5b. Permisos web Vicidial (wwwrun + SELinux httpd_sys_rw_content_t)..." +if [ -d /srv/www/htdocs/vicidial ]; then + chown -R wwwrun:www /srv/www/htdocs/vicidial >> "$LOG_FILE" 2>&1 +fi +if [ -d /srv/www/htdocs/agc ]; then + chown -R wwwrun:www /srv/www/htdocs/agc >> "$LOG_FILE" 2>&1 +fi +if [ "$(getenforce 2>/dev/null)" = "Enforcing" ]; then + [ -d /srv/www/htdocs/vicidial ] && chcon -R -t httpd_sys_rw_content_t /srv/www/htdocs/vicidial >> "$LOG_FILE" 2>&1 || true + [ -d /srv/www/htdocs/agc ] && chcon -R -t httpd_sys_rw_content_t /srv/www/htdocs/agc >> "$LOG_FILE" 2>&1 || true +fi +info " Listo (escritura bajo /srv/www/htdocs/vicidial y agc)" +echo "" + # --- 6. Aplicar parches a vicibox-install.pl --- info "6. Aplicando parches a vicibox-install.pl (socket MySQL, random_pass, etc.)..." if [ -f "${SCRIPT_DIR}/patches/vicibox-install.pl" ]; then diff --git a/Custom/stage_custom_assets.sh b/Custom/stage_custom_assets.sh new file mode 100644 index 0000000..e9eb664 --- /dev/null +++ b/Custom/stage_custom_assets.sh @@ -0,0 +1,88 @@ +#!/usr/bin/env bash +set -euo pipefail + +# Copia: +# - Custom/backvicibox -> /home/backvicibox +# - Custom/installer custom -> ${HTDOCS}/agc/css/installer +# +# Uso típico (desde el repo en el servidor): +# sudo HTDOCS=/srv/www/htdocs bash Custom/stage_custom_assets.sh +# +# Si el repo está en otra ruta: +# sudo SRC_REPO=/ruta/al/repo HTDOCS=/srv/www/htdocs bash Custom/stage_custom_assets.sh + +SRC_REPO="${SRC_REPO:-$PWD}" +HTDOCS="${HTDOCS:-/srv/www/htdocs}" + +BACKVICIBOX_SRC="${SRC_REPO}/Custom/backvicibox" +INSTALLER_CUSTOM_SRC="${SRC_REPO}/Custom/installer custom" + +BACKVICIBOX_DST="/home/backvicibox" +AGC_INSTALLER_DST="${HTDOCS}/agc/css/installer" + +need_root() { + if [[ "${EUID}" -ne 0 ]]; then + echo "ERROR: ejecuta como root (sudo)." >&2 + exit 1 + fi +} + +require_dir() { + local d="$1" + if [[ ! -d "$d" ]]; then + echo "ERROR: no existe el directorio: $d" >&2 + exit 1 + fi +} + +have_cmd() { + command -v "$1" >/dev/null 2>&1 +} + +copy_tree() { + local src="$1" + local dst="$2" + + mkdir -p "$dst" + + if have_cmd rsync; then + # --delete: deja el destino idéntico al origen + rsync -a --delete "$src"/ "$dst"/ + else + # Fallback sin borrar extras en destino + cp -a "$src"/. "$dst"/ + fi +} + +main() { + need_root + + require_dir "$BACKVICIBOX_SRC" + require_dir "$INSTALLER_CUSTOM_SRC" + + echo "==> Origen repo: ${SRC_REPO}" + echo "==> HTDOCS: ${HTDOCS}" + echo "" + + echo "==> Copiando backvicibox a ${BACKVICIBOX_DST}" + copy_tree "$BACKVICIBOX_SRC" "$BACKVICIBOX_DST" + + echo "==> Copiando installer custom a ${AGC_INSTALLER_DST}" + copy_tree "$INSTALLER_CUSTOM_SRC" "$AGC_INSTALLER_DST" + + echo "==> Ajustando permisos ejecutables" + chmod +x "${BACKVICIBOX_DST}/"*.sh 2>/dev/null || true + chmod +x "${AGC_INSTALLER_DST}/install_custom_css.sh" 2>/dev/null || true + + echo "" + echo "Listo." + echo "- backvicibox: ${BACKVICIBOX_DST}" + echo "- installer: ${AGC_INSTALLER_DST}" + echo "" + echo "Siguiente (opcional):" + echo " HTDOCS=${HTDOCS} ${AGC_INSTALLER_DST}/install_custom_css.sh status" + echo " HTDOCS=${HTDOCS} ${AGC_INSTALLER_DST}/install_custom_css.sh install" +} + +main "$@" +