diff options
author | Ermal <eri@pfsense.org> | 2012-06-12 09:33:42 +0000 |
---|---|---|
committer | Ermal <eri@pfsense.org> | 2012-06-12 09:33:42 +0000 |
commit | 18a1c9965b1d6ce92a07a36e56d5ebdf7554323b (patch) | |
tree | 1077ed049f0073ab8799bf48e813100b1b384cf2 /config/snort/snort_check_for_rule_updates.php | |
parent | 60729223ea389e89e0c840378d80121beef68ce9 (diff) | |
download | pfsense-packages-18a1c9965b1d6ce92a07a36e56d5ebdf7554323b.tar.gz pfsense-packages-18a1c9965b1d6ce92a07a36e56d5ebdf7554323b.tar.bz2 pfsense-packages-18a1c9965b1d6ce92a07a36e56d5ebdf7554323b.zip |
Centralize the snort update tarball and use 2922 file for rules.
Diffstat (limited to 'config/snort/snort_check_for_rule_updates.php')
-rw-r--r-- | config/snort/snort_check_for_rule_updates.php | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/config/snort/snort_check_for_rule_updates.php b/config/snort/snort_check_for_rule_updates.php index 5043a624..41995e9d 100644 --- a/config/snort/snort_check_for_rule_updates.php +++ b/config/snort/snort_check_for_rule_updates.php @@ -40,8 +40,8 @@ $pkg_interface = "console"; $tmpfname = "/usr/local/etc/snort/tmp/snort_rules_up"; $snortdir = "/usr/local/etc/snort"; $snortdir_wan = "/usr/local/etc/snort"; -$snort_filename_md5 = "snortrules-snapshot-2905.tar.gz.md5"; -$snort_filename = "snortrules-snapshot-2905.tar.gz"; +$snort_filename_md5 = "{$snort_rules_file}.md5"; +$snort_filename = "{$snort_rules_file}"; $emergingthreats_filename_md5 = "emerging.rules.tar.gz.md5"; $emergingthreats_filename = "emerging.rules.tar.gz"; $pfsense_rules_filename_md5 = "pfsense_rules.tar.gz.md5"; @@ -64,31 +64,23 @@ $snortdownload = $config['installedpackages']['snortglobal']['snortdownload']; $emergingthreats = $config['installedpackages']['snortglobal']['emergingthreats']; if ($snortdownload == 'off' && $emergingthreats != 'on') -{ $snort_emrging_info = 'stop'; -} if ($oinkid == "" && $snortdownload != 'off') -{ $snort_oinkid_info = 'stop'; -} - /* check if main rule directory is empty */ $if_mrule_dir = "/usr/local/etc/snort/rules"; $mfolder_chk = (count(glob("$if_mrule_dir/*")) === 0) ? 'empty' : 'full'; - -if (file_exists('/var/run/snort.conf.dirty')) { +if (file_exists('/var/run/snort.conf.dirty')) $snort_dirty_d = 'stop'; -} /* Start of code */ conf_mount_rw(); -if (!is_dir('/usr/local/etc/snort/tmp')) { +if (!is_dir('/usr/local/etc/snort/tmp')) exec('/bin/mkdir -p /usr/local/etc/snort/tmp'); -} $snort_md5_check_ok = 'off'; $emerg_md5_check_ok = 'off'; |