From 6f292b2a059cb14e9a7607e8993e8d44a9264748 Mon Sep 17 00:00:00 2001 From: lgromero Date: Tue, 15 Apr 2025 14:51:46 +0200 Subject: [PATCH] refs #1835 removes oglog environment variable from setup filebeat --- chroot-tasks.py | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/chroot-tasks.py b/chroot-tasks.py index b47b4e3..edfd980 100755 --- a/chroot-tasks.py +++ b/chroot-tasks.py @@ -148,21 +148,14 @@ def setup_filebeat(): deb_path = "/etc/filebeat/filebeat-oss-7.12.1-amd64.deb" try: - # Instalar Filebeat desde el .deb directamente subprocess.run(["dpkg", "-i", "--force-overwrite", deb_path], check=True) - # (Opcional) Garantizar permisos adecuados sobre los certificados y configuraciones subprocess.run(["chmod", "644", "/etc/filebeat/ogagent-fb.mytld.crt.pem"], check=True) subprocess.run(["chmod", "600", "/etc/filebeat/ogagent-fb.mytld.key.pem"], check=True) subprocess.run(["chmod", "644", "/etc/ssl/certs/ca.crt.pem"], check=True) subprocess.run(["chmod", "644", "/etc/filebeat/filebeat.yml"], check=True) - # Añadir entrada al /etc/hosts - oglog_ip = os.getenv('OGAGENTCFG_OGLOG_IP', '192.168.2.4') - with open('/etc/hosts', 'a') as f: - f.write(f"{oglog_ip} oglog-os.mytld\n") - - print("Filebeat instalado y ejecutándose correctamente.") + print("Filebeat instalado.") except subprocess.CalledProcessError as e: print(f"Error instalando Filebeat: {e}")