From dcbae79b06a7a5c4db0519bfad67310105c76db1 Mon Sep 17 00:00:00 2001 From: hcornet Date: Fri, 25 Apr 2025 16:56:21 +0200 Subject: [PATCH] Update : GLPI file config --- custom/custom_glpi | 3 ++- modules/glpi_agent.sh | 8 +++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/custom/custom_glpi b/custom/custom_glpi index cc8c2f0..a8faef7 100644 --- a/custom/custom_glpi +++ b/custom/custom_glpi @@ -1,2 +1,3 @@ # variables -GLPI_SERVER="glpi.tips-of-mine.fr" \ No newline at end of file +GLPI_SERVER="glpi.tips-of-mine.fr" +GLPI_TAG="SecuredServer" \ No newline at end of file diff --git a/modules/glpi_agent.sh b/modules/glpi_agent.sh index 42c6980..9b367b6 100644 --- a/modules/glpi_agent.sh +++ b/modules/glpi_agent.sh @@ -92,7 +92,7 @@ install_glpi_agent() { # Configure GLPI agent log_message "INFO" "Configuring GLPI agent" - local glpi_conf="/etc/glpi-agent/agent.cfg" + local glpi_conf="/etc/glpi-agent/conf.d/00-install.cfg" # Backup existing configuration if it exists if [ -f "$glpi_conf" ]; then @@ -105,7 +105,7 @@ install_glpi_agent() { # Generated by security hardening script # Server URL - Replace with your actual GLPI server URL -server = https://"$GLPI_SERVER"/glpi/api/inventory +server = https://"$GLPI_SERVER"/marketplace/glpiinventory/ # Disable SSL certificate validation for testing (set to 1 for production) no-ssl-check = 0 # Run as daemon (0 = no, 1 = yes) @@ -119,7 +119,9 @@ scan-profiles = 1 # Inventory frequency (in hours) delaytime = 24 # Tag for the agent -tag = SecuredServer +tag = "$GLPI_TAG" +# Color for terminal +color = 1 EOF log_message "SUCCESS" "GLPI agent configuration created at $glpi_conf"