refs #1100 Adds TFTPPATH to nginx template
parent
710fe4c237
commit
6576a4c9ec
|
@ -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
|
||||
|
||||
|
|
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue