Skip to content

Commit

Permalink
fix: completey remove snort folders when uninstalling
Browse files Browse the repository at this point in the history
  • Loading branch information
ArmandMeppa committed Dec 17, 2024
1 parent acf2e3b commit 6f114c8
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions scripts/uninstall.sh
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ revert_ossec_conf() {

if maybe_sudo grep -q "$snort_tag" "$ossec_conf"; then
maybe_sudo sed -i "/$snort_tag/,/<\/localfile>/d" "$ossec_conf"
success_message "Reverted changes in $ossec_conf"
info_message "Reverted changes in $ossec_conf"
else
info_message "No Snort-related changes found in $ossec_conf"
fi
Expand Down Expand Up @@ -130,13 +130,9 @@ uninstall_snort_linux() {
fi

remove_snort_dirs_files \
"/etc/snort/rules" \
"/etc/snort/" \
"/var/log/snort"

remove_snort_files \
"/etc/snort/snort.conf" \
"/etc/snort/rules/local.rules"

revert_ossec_conf "$OSSEC_CONF_PATH"
success_message "Snort uninstalled on Linux"
}
Expand Down

0 comments on commit 6f114c8

Please sign in to comment.