aboutsummaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
authorbmeeks8 <bmeeks8@bellsouth.net>2014-10-09 14:24:01 -0400
committerbmeeks8 <bmeeks8@bellsouth.net>2014-10-09 14:24:01 -0400
commit07fe7dc6ac15532cfeafe3e02b99de57c4db7c92 (patch)
treeb9d6175a278d2809b098c6595df9e36f1a6243e4 /config
parentc26b1f33f4d0a33a148f79dd9d91bedfef96a7c4 (diff)
downloadpfsense-packages-07fe7dc6ac15532cfeafe3e02b99de57c4db7c92.tar.gz
pfsense-packages-07fe7dc6ac15532cfeafe3e02b99de57c4db7c92.tar.bz2
pfsense-packages-07fe7dc6ac15532cfeafe3e02b99de57c4db7c92.zip
Fix logic to only restart Snort if it was running on rules update.
Diffstat (limited to 'config')
-rwxr-xr-xconfig/snort/snort_check_for_rule_updates.php5
1 files changed, 2 insertions, 3 deletions
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..."));