diff options
author | bmeeks8 <bmeeks8@bellsouth.net> | 2014-10-07 16:46:48 -0400 |
---|---|---|
committer | bmeeks8 <bmeeks8@bellsouth.net> | 2014-10-07 16:46:48 -0400 |
commit | 4fa9c97866c90b7bb84ff7b55579b646b53184f1 (patch) | |
tree | 4aeb6cae43a5bcd1892fb2a7a7fbd908ea174ba5 /config/snort | |
parent | c6e674ea2090bc36b10dd0e7230dbf9d2036a00e (diff) | |
download | pfsense-packages-4fa9c97866c90b7bb84ff7b55579b646b53184f1.tar.gz pfsense-packages-4fa9c97866c90b7bb84ff7b55579b646b53184f1.tar.bz2 pfsense-packages-4fa9c97866c90b7bb84ff7b55579b646b53184f1.zip |
Improve how Snort is restarted after a rules update.
Diffstat (limited to 'config/snort')
-rwxr-xr-x | config/snort/snort_check_for_rule_updates.php | 17 |
1 files changed, 2 insertions, 15 deletions
diff --git a/config/snort/snort_check_for_rule_updates.php b/config/snort/snort_check_for_rule_updates.php index 975644f1..e2f5997c 100755 --- a/config/snort/snort_check_for_rule_updates.php +++ b/config/snort/snort_check_for_rule_updates.php @@ -787,21 +787,8 @@ if ($snortdownload == 'on' || $emergingthreats == 'on' || $snortcommunityrules = } error_log(gettext("\tRestarting Snort to activate the new set of rules...\n"), 3, $snort_rules_upd_log); touch("{$g['varrun_path']}/snort_pkg_starting.lck"); - foreach ($config['installedpackages']['snortglobal']['rule'] as $snortcfg) { - if ($snortcfg['enable'] != "on") - continue; - $if_real = get_real_interface($snortcfg['interface']); - if (snort_is_running($snortcfg['uuid'], $if_real, 'snort')) { - snort_stop($snortcfg, $if_real); - sleep(2); - if ($pkg_interface <> "console") { - update_output_window(gettext("Starting Snort on " . convert_friendly_interface_to_friendly_descr($snortcfg['interface']) . "...")); - snort_start($snortcfg, $if_real, FALSE); - } - else - snort_start($snortcfg, $if_real, TRUE); - } - } + snort_start_all_interfaces(TRUE); + sleep(3); unlink_if_exists("{$g['varrun_path']}/snort_pkg_starting.lck"); if ($pkg_interface <> "console") update_output_window(gettext("Snort has restarted with your new set of rules...")); |