aboutsummaryrefslogtreecommitdiffstats
path: root/config/snort/snort_post_install.php
diff options
context:
space:
mode:
Diffstat (limited to 'config/snort/snort_post_install.php')
-rw-r--r--config/snort/snort_post_install.php21
1 files changed, 21 insertions, 0 deletions
diff --git a/config/snort/snort_post_install.php b/config/snort/snort_post_install.php
index 57e92ce5..bbe7e3e2 100644
--- a/config/snort/snort_post_install.php
+++ b/config/snort/snort_post_install.php
@@ -115,6 +115,27 @@ if ($pkgid >= 0) {
/* Define a default Dashboard Widget Container for Snort */
$snort_widget_container = "snort_alerts-container:col2:close";
+/*********************************************************/
+/* START OF BUG FIX CODE */
+/* */
+/* Remove any Snort cron tasks that may have been left */
+/* from a previous uninstall due to a bug that saved */
+/* edited cron tasks as new ones while still leaving */
+/* the original task. Correct cron task entries will */
+/* be recreated below if saved settings are detected. */
+/*********************************************************/
+$cron_count = 0;
+while (snort_cron_job_exists("snort2c", FALSE)) {
+ install_cron_job("snort2c", false);
+ $cron_count++;
+}
+if ($cron_count > 0)
+ log_error(gettext("[Snort] Removed {$cron_count} duplicate 'remove_blocked_hosts' cron task(s)."));
+
+/*********************************************************/
+/* END OF BUG FIX CODE */
+/*********************************************************/
+
/* remake saved settings */
if ($config['installedpackages']['snortglobal']['forcekeepsettings'] == 'on') {
log_error(gettext("[Snort] Saved settings detected... rebuilding installation with saved settings..."));