diff --git a/custom/custom_glpi b/custom/custom_glpi index a8faef7..239f3a9 100644 --- a/custom/custom_glpi +++ b/custom/custom_glpi @@ -1,3 +1,4 @@ # variables + GLPI_SERVER="glpi.tips-of-mine.fr" GLPI_TAG="SecuredServer" \ No newline at end of file diff --git a/custom/custom_wazuh b/custom/custom_wazuh index 4287ca8..9c3af80 100644 --- a/custom/custom_wazuh +++ b/custom/custom_wazuh @@ -1 +1,3 @@ -# \ No newline at end of file +# variables + +WAZUH_MANAGER="YOUR_WAZUH_MANAGER_IP" \ No newline at end of file diff --git a/modules/glpi_agent.sh b/modules/glpi_agent.sh index 9b367b6..8387ff1 100644 --- a/modules/glpi_agent.sh +++ b/modules/glpi_agent.sh @@ -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"/marketplace/glpiinventory/ +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,7 @@ scan-profiles = 1 # Inventory frequency (in hours) delaytime = 24 # Tag for the agent -tag = "$GLPI_TAG" +tag = $GLPI_TAG # Color for terminal color = 1 EOF diff --git a/modules/wazuh_agent.sh b/modules/wazuh_agent.sh index ffc36ba..7d54ba4 100644 --- a/modules/wazuh_agent.sh +++ b/modules/wazuh_agent.sh @@ -8,6 +8,7 @@ SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" # Source common functions and variables source "./common.sh" +source "./custom/custom_wazuh" # Function to install Wazuh agent install_wazuh_agent() { @@ -52,11 +53,7 @@ install_wazuh_agent() { if [ -f "$wazuh_conf" ]; then backup_file "$wazuh_conf" fi - - # Modify the configuration to point to your Wazuh server - # Replace with your actual Wazuh server IP address - local WAZUH_MANAGER="YOUR_WAZUH_MANAGER_IP" - + # Configure Wazuh agent to connect to the manager /var/ossec/bin/agent-auth -m "$WAZUH_MANAGER"