From 07fe7dc6ac15532cfeafe3e02b99de57c4db7c92 Mon Sep 17 00:00:00 2001 From: bmeeks8 Date: Thu, 9 Oct 2014 14:24:01 -0400 Subject: Fix logic to only restart Snort if it was running on rules update. --- config/snort/snort_check_for_rule_updates.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'config/snort/snort_check_for_rule_updates.php') diff --git a/config/snort/snort_check_for_rule_updates.php b/config/snort/snort_check_for_rule_updates.php index e2f5997c..17585336 100755 --- a/config/snort/snort_check_for_rule_updates.php +++ b/config/snort/snort_check_for_rule_updates.php @@ -778,9 +778,8 @@ if ($snortdownload == 'on' || $emergingthreats == 'on' || $snortcommunityrules = /* Clear the rebuild rules flag. */ $rebuild_rules = false; - /* Restart snort if running, and we are not in post-install */ - /* and not rebooting, so as to pick up the new rules. */ - if (!$g['snort_postinstall'] && !$g['booting'] && !file_exists("{$g['varrun_path']}/booting")) { + /* Restart snort if running, and not in post-install, so as to pick up the new rules. */ + if (!$g['snort_postinstall'] && is_service_running("snort") && count($config['installedpackages']['snortglobal']['rule']) > 0) { if ($pkg_interface <> "console") { update_status(gettext('Restarting Snort to activate the new set of rules...')); update_output_window(gettext("Please wait ... restarting Snort will take some time...")); -- cgit v1.2.3