Skip to content

Commit

Permalink
fix: use warn_message instead of error_message for missing config file
Browse files Browse the repository at this point in the history
- Updated update_ossec_conf() to use warn_message when OSSEC config file is not found.
- Ensured appropriate warning is issued instead of an error.
  • Loading branch information
bengo237 committed Sep 12, 2024
1 parent 5141fde commit 0c8832a
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion scripts/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ download_yara_script() {
exit 1
fi

# Ensure the parent directory for YARA_SH_PATH exists
# Ensure the pare"$OSSEC_CONF_PATH"nt directory for YARA_SH_PATH exists
maybe_sudo mkdir -p "$(dirname "$YARA_SH_PATH")"

maybe_sudo curl -SL --progress-bar "$YARA_SH_URL" -o "$TMP_DIR/yara.sh" || {
Expand All @@ -201,6 +201,14 @@ 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
error_message "OSSEC configuration file not found at $OSSEC_CONF_PATH."
# Exit the function to avoid further actions
exit 1
fi

# Determine the OS type
if [[ "$(uname)" == "Darwin" ]]; then
# macOS
Expand Down

0 comments on commit 0c8832a

Please sign in to comment.