Skip to content

Commit

Permalink
chore: Update OSSEC configuration handling in install.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
bengo237 committed Sep 12, 2024
1 parent 666caac commit c68a63e
Showing 1 changed file with 12 additions and 9 deletions.
21 changes: 12 additions & 9 deletions scripts/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -201,14 +201,6 @@ download_yara_script() {
}

update_ossec_conf() {
# Check if the OSSEC configuration file exists
if [ ! -f "$OSSEC_CONF_PATH" ]; then
# Notify the user that the file is missing
warn_message "OSSEC configuration file not found at $OSSEC_CONF_PATH."
# Exit the function to avoid further actions
return 1
fi

# Determine the OS type
if [[ "$(uname)" == "Darwin" ]]; then
# macOS
Expand Down Expand Up @@ -359,7 +351,18 @@ download_yara_script

# Step 4: Update Wazuh agent configuration file
print_step 4 "Updating Wazuh agent configuration file..."
update_ossec_conf

# Check if the OSSEC configuration file exists
if [ -f "$OSSEC_CONF_PATH" ]; then
# Call the function to update OSSEC configuration
update_ossec_conf
else
# Notify the user that the file is missing
warn_message "OSSEC configuration file not found at $OSSEC_CONF_PATH."
# Exit the function to avoid further actions
return 1
fi


# Step 5: Restart Wazuh agent
print_step 5 "Restarting Wazuh agent..."
Expand Down

0 comments on commit c68a63e

Please sign in to comment.