diff options
author | robiscool <robrob2626@yahoo.com> | 2009-06-10 10:39:41 -0700 |
---|---|---|
committer | robiscool <robrob2626@yahoo.com> | 2009-06-10 10:40:28 -0700 |
commit | 58600afda024caa8c59c0269e57f899b3ee19f3a (patch) | |
tree | 100ad01a0118ea74caae2d15130a4c107a7c1f53 | |
parent | 33082e20945d3b499f8949ac9dbd8087566eb722 (diff) | |
download | pfsense-packages-58600afda024caa8c59c0269e57f899b3ee19f3a.tar.gz pfsense-packages-58600afda024caa8c59c0269e57f899b3ee19f3a.tar.bz2 pfsense-packages-58600afda024caa8c59c0269e57f899b3ee19f3a.zip |
Add sync commands and apc_clear_cache force pfsense to write to disk, removed Emerging Rules that are ment for Inline-mode,remove out of date files
-rw-r--r-- | config/snort/snort_download_rules.php | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/config/snort/snort_download_rules.php b/config/snort/snort_download_rules.php index 240f9ea6..1f2bb30c 100644 --- a/config/snort/snort_download_rules.php +++ b/config/snort/snort_download_rules.php @@ -161,6 +161,7 @@ ob_flush(); if (file_exists("{$tmpfname}")) { update_status(gettext("Removing old tmp files...")); exec("/bin/rm -r {$tmpfname}"); + apc_clear_cache(); } /* send current buffer */ @@ -539,10 +540,30 @@ if (file_exists("{$tmpfname}/so_rules/precompiled/FreeBSD-7.0/i386/2.8.4/")) { } } +/* double make shure clean up emerg rules that dont belong */ +if (file_exists("/usr/local/etc/snort/rules/emerging-botcc-BLOCK.rules")) { + apc_clear_cache(); + exec("/bin/rm -r /usr/local/etc/snort/rules/emerging-botcc-BLOCK.rules"); + exec("/bin/rm -r /usr/local/etc/snort/rules/emerging-botcc.rules"); + exec("/bin/rm -r /usr/local/etc/snort/rules/emerging-compromised-BLOCK.rules"); + exec("/bin/rm -r /usr/local/etc/snort/rules/emerging-drop-BLOCK.rules"); + exec("/bin/rm -r /usr/local/etc/snort/rules/emerging-dshield-BLOCK.rules"); + exec("/bin/rm -r /usr/local/etc/snort/rules/emerging-rbn-BLOCK.rules"); + exec("/bin/rm -r /usr/local/etc/snort/rules/emerging-tor-BLOCK.rules"); +} + +if (file_exists("/usr/local/lib/snort/dynamicrules//lib_sfdynamic_example_rule.so")) { + exec("/bin/rm -r /usr/local/lib/snort/dynamicrules//lib_sfdynamic_example_rule.so"); + exec("/bin/rm -r /usr/local/lib/snort/dynamicrules//lib_sfdynamic_example*"); +} + +/* php code to flush out cache some people are reportting missing files this might help */ +apc_clear_cache(); +exec("/bin/sync ;/bin/sync ;/bin/sync ;/bin/sync ;/bin/sync ;/bin/sync ;/bin/sync ;/bin/sync"); /* php code finish */ update_status(gettext("The Rules update finished...")); -update_output_window(gettext("Please reboot Pfsense before starting Snort...")); +update_output_window(gettext("You may start snort now...")); /* hide progress bar and lets end this party */ hide_progress_bar_status(); |