From 6576a4c9ec255f3a381b626700c2419c6ae13c00 Mon Sep 17 00:00:00 2001 From: lgromero Date: Tue, 5 Nov 2024 12:44:53 +0100 Subject: [PATCH] refs #1100 Adds TFTPPATH to nginx template --- etc/nginxServer.conf.tmpl | 2 +- installer/ogboot_installer.py | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/etc/nginxServer.conf.tmpl b/etc/nginxServer.conf.tmpl index 3e6d75d..9c2c6da 100644 --- a/etc/nginxServer.conf.tmpl +++ b/etc/nginxServer.conf.tmpl @@ -41,7 +41,7 @@ server { # Ruta base para servir archivos de TFTP location /tftpboot { - alias /opt/ogboot/tftpboot; + alias __TFTPPATH__; autoindex on; # Permitir listado de directorios try_files $uri $uri/ =404; # Intentar servir archivos, si no se encuentra devolver 404 diff --git a/installer/ogboot_installer.py b/installer/ogboot_installer.py index a98e28d..628a6cb 100755 --- a/installer/ogboot_installer.py +++ b/installer/ogboot_installer.py @@ -365,7 +365,7 @@ def tftpConfigure(): TFTP_USERNAME="tftp" TFTP_DIRECTORY="/var/lib/tftpboot" TFTP_ADDRESS="0.0.0.0:69" -TFTP_OPTIONS="--secure" +TFTP_OPTIONS="--secure -v" """ with open("/tmp/tftpd-hpa", "w") as config_file: config_file.write(tftpd_config) @@ -629,7 +629,8 @@ def setup_nginx(): nginx_content = nginx_content.replace("__SERVERIP__", ip_address_server) nginx_content = nginx_content.replace("__PHPVERSION__", php_version) nginx_content = nginx_content.replace("__ROOT__", INSTALL_OGBOOT_TARGET) - + nginx_content = nginx_content.replace("__TFTPPATH__", f"{INSTALL_OGBOOT_TARGET}/tftpboot") + # Ruta de destino para la configuración de nginx nginx_output = "/etc/nginx/sites-available/ogboot.conf" with open(nginx_output, 'w') as nginx_file: