Skip to content

Commit

Permalink
chore: Update Snort installation script for macOS
Browse files Browse the repository at this point in the history
  • Loading branch information
bengo237 committed Sep 11, 2024
1 parent 5edea25 commit 28903df
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions scripts/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -156,16 +156,24 @@ update_ossec_conf_macos() {
</localfile>"

info_message "Updating $OSSEC_CONF_PATH"

# Add the Snort configuration to ossec.conf
if ! grep -q "$content_to_add" "$OSSEC_CONF_PATH"; then
maybe_sudo sed -i '' "/<\/ossec_config>/i\\
$content_to_add" "$OSSEC_CONF_PATH"
sudo sed -i '' -e "/<\/ossec_config>/i\\
<!-- snort -->\\
<localfile>\\
<log_format>snort-full</log_format>\\
<location>/var/log/snort/alert_fast.txt</location>\\
</localfile>" "$OSSEC_CONF_PATH"

success_message "ossec.conf updated on macOS"
else
info_message "The content already exists in $OSSEC_CONF_PATH"
fi
}



# Function to start Snort on macOS
start_snort_macos() {
info_message "Starting Snort"
Expand Down

0 comments on commit 28903df

Please sign in to comment.