diff options
author | robiscool <robrob2626@yahoo.com> | 2009-09-11 04:36:59 -0700 |
---|---|---|
committer | robiscool <robrob2626@yahoo.com> | 2009-09-11 04:36:59 -0700 |
commit | 199eb9d66fabb649bf8c6fcaa09876dd28d24688 (patch) | |
tree | 45fa5f67d0fd9f37d2d242a2c1f05bb559b99a2d /config/snort-dev/snort.inc | |
parent | 42dd785bc1645024688058d372c08931bc1c9c08 (diff) | |
download | pfsense-packages-199eb9d66fabb649bf8c6fcaa09876dd28d24688.tar.gz pfsense-packages-199eb9d66fabb649bf8c6fcaa09876dd28d24688.tar.bz2 pfsense-packages-199eb9d66fabb649bf8c6fcaa09876dd28d24688.zip |
snort-dev, update thr first install
Diffstat (limited to 'config/snort-dev/snort.inc')
-rw-r--r-- | config/snort-dev/snort.inc | 50 |
1 files changed, 35 insertions, 15 deletions
diff --git a/config/snort-dev/snort.inc b/config/snort-dev/snort.inc index e1685124..f09f2804 100644 --- a/config/snort-dev/snort.inc +++ b/config/snort-dev/snort.inc @@ -87,7 +87,28 @@ function sync_package_snort() { global $config, $g; - mwexec("mkdir -p /var/log/snort/"); + /* create a few directories and ensure the sample files are in place */ + exec("/bin/mkdir -p /usr/local/etc/snort_bkup"); + exec("/bin/mkdir -p /usr/local/etc/snort"); + exec("/bin/mkdir -p /var/log/snort"); + exec("/bin/mkdir -p /usr/local/etc/snort/rules"); + + if(file_exists("/usr/local/etc/snort/unicode.map-sample")) { + exec("/bin/cp /usr/local/etc/snort/unicode.map-sample /usr/local/etc/snort/unicode.map"); + exec("/bin/cp /usr/local/etc/snort/classification.config-sample /usr/local/etc/snort/classification.config"); + exec("/bin/cp /usr/local/etc/snort/gen-msg.map-sample /usr/local/etc/snort/gen-msg.map"); + exec("/bin/cp /usr/local/etc/snort/generators-sample /usr/local/etc/snort/generators"); + exec("/bin/cp /usr/local/etc/snort/reference.config-sample /usr/local/etc/snort/reference.config"); + exec("/bin/cp /usr/local/etc/snort/sid-msg.map-sample /usr/local/etc/snort/sid-msg.map"); + exec("/bin/cp /usr/local/etc/snort/sid-sample /usr/local/etc/snort/sid"); + exec("/bin/cp /usr/local/etc/snort/threshold.conf-sample /usr/local/etc/snort/threshold.conf"); + exec("/bin/cp /usr/local/etc/snort/unicode.map-sample /usr/local/etc/snort/unicode.map"); + exec("/bin/rm -f /usr/local/etc/rc.d/snort"); + exec("/bin/rm /usr/local/lib/snort/dynamicrules/*"); + } + + if(!file_exists("/usr/local/etc/snort/rules/local.rules")) + exec("/bin/cp /usr/local/pkg/local.rules /usr/local/etc/snort/rules/local.rules"); if(!file_exists("/var/log/snort/alert")) touch("/var/log/snort/alert"); @@ -105,20 +126,19 @@ function sync_package_snort() conf_mount_rw(); /* create a few directories and ensure the sample files are in place */ - exec("/bin/mkdir -p /usr/local/etc/snort"); - exec("/bin/mkdir -p /var/log/snort"); - exec("/bin/mkdir -p /usr/local/etc/snort/rules"); - exec("/bin/cp /usr/local/etc/snort/unicode.map-sample /usr/local/etc/snort/unicode.map"); - exec("/bin/cp /usr/local/etc/snort/classification.config-sample /usr/local/etc/snort/classification.config"); - exec("/bin/cp /usr/local/etc/snort/gen-msg.map-sample /usr/local/etc/snort/gen-msg.map"); - exec("/bin/cp /usr/local/etc/snort/generators-sample /usr/local/etc/snort/generators"); - exec("/bin/cp /usr/local/etc/snort/reference.config-sample /usr/local/etc/snort/reference.config"); - exec("/bin/cp /usr/local/etc/snort/sid-msg.map-sample /usr/local/etc/snort/sid-msg.map"); - exec("/bin/cp /usr/local/etc/snort/sid-sample /usr/local/etc/snort/sid"); - exec("/bin/cp /usr/local/etc/snort/threshold.conf-sample /usr/local/etc/snort/threshold.conf"); - exec("/bin/cp /usr/local/etc/snort/unicode.map-sample /usr/local/etc/snort/unicode.map"); - exec("/usr/bin/touch /usr/local/etc/snort/rules/local.rules"); - exec("/bin/rm -f /usr/local/etc/rc.d/snort"); +// exec("/bin/mkdir -p /usr/local/etc/snort"); +// exec("/bin/mkdir -p /var/log/snort"); +// exec("/bin/mkdir -p /usr/local/etc/snort/rules"); +// exec("/bin/cp /usr/local/etc/snort/unicode.map-sample /usr/local/etc/snort/unicode.map"); +// exec("/bin/cp /usr/local/etc/snort/classification.config-sample /usr/local/etc/snort/classification.config"); +// exec("/bin/cp /usr/local/etc/snort/gen-msg.map-sample /usr/local/etc/snort/gen-msg.map"); +// exec("/bin/cp /usr/local/etc/snort/generators-sample /usr/local/etc/snort/generators"); +// exec("/bin/cp /usr/local/etc/snort/reference.config-sample /usr/local/etc/snort/reference.config"); +// exec("/bin/cp /usr/local/etc/snort/sid-msg.map-sample /usr/local/etc/snort/sid-msg.map"); +// exec("/bin/cp /usr/local/etc/snort/sid-sample /usr/local/etc/snort/sid"); +// exec("/bin/cp /usr/local/etc/snort/threshold.conf-sample /usr/local/etc/snort/threshold.conf"); +// exec("/bin/cp /usr/local/etc/snort/unicode.map-sample /usr/local/etc/snort/unicode.map"); +// exec("/bin/rm -f /usr/local/etc/rc.d/snort"); $first = 0; |