refs #1100 Adds TFTPPATH to nginx template

ogboot-log
Luis Gerardo Romero Garcia 2024-11-05 12:44:53 +01:00
parent 710fe4c237
commit 6576a4c9ec
2 changed files with 4 additions and 3 deletions

View File

@ -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

View File

@ -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: