diff options
author | Michael Mason <ms13sp@gmail.com> | 2009-03-10 13:46:20 +0000 |
---|---|---|
committer | Michael Mason <ms13sp@gmail.com> | 2009-03-10 13:46:20 +0000 |
commit | a8476f9cc0cfe1f082e0743727b086d43496ab1a (patch) | |
tree | ad11ad4c9cc7d846e2402f4528581dfa469d4e0f /extra | |
parent | d8a35a2dd4fff448d93b7d52b3caf69fae687bbf (diff) | |
download | aports-a8476f9cc0cfe1f082e0743727b086d43496ab1a.tar.bz2 aports-a8476f9cc0cfe1f082e0743727b086d43496ab1a.tar.xz |
extra/snort Initial Commit
Diffstat (limited to 'extra')
-rw-r--r-- | extra/snort/APKBUILD | 37 | ||||
-rw-r--r-- | extra/snort/snort.confd | 16 | ||||
-rw-r--r-- | extra/snort/snort.initd | 31 | ||||
-rw-r--r-- | extra/snort/snort.pre-install | 3 |
4 files changed, 87 insertions, 0 deletions
diff --git a/extra/snort/APKBUILD b/extra/snort/APKBUILD new file mode 100644 index 0000000000..8d2b34a00c --- /dev/null +++ b/extra/snort/APKBUILD @@ -0,0 +1,37 @@ +# Contributor: Michael Mason <ms13sp@gmail.com> +pkgname=snort +pkgver=2.8.3.2 +pkgrel=0 +pkgdesc="An open source network intrusion prevention and detection system" +url="http://www.snort.org/" +license="GPL" +depends="uclibc libpcap libnet" +makedepends="pcre-dev libpcap-dev libnet-dev" +install="$pkgname.pre-install" +subpackages="$pkgname-doc $pkgname-dev" +source="http://www.snort.org/dl/$pkgname-$pkgver.tar.gz + snort.initd + snort.confd + $install + " + +build() { + cd "$srcdir/$pkgname-$pkgver" + + ./configure --prefix=/usr \ + --sysconfdir=/etc \ + --mandir=/usr/share/man \ + --infodir=/usr/share/info \ + --enable-ipv6 \ + --enable-gre + make -j1 || return 1 + make -j1 DESTDIR="$pkgdir" install + + install -D -m 755 ../snort.initd ${pkgdir}/etc/init.d/snort + install -D -m 644 ../snort.confd ${pkgdir}/etc/conf.d/snort +} + +md5sums="f75547da33446ddb4ca07eefd9ce31dc snort-2.8.3.2.tar.gz +b3207150805e7b948d958c6f86e70a5b snort.initd +446f8d2b3435b8a6be738da978670605 snort.confd +fc0cd41b3f16781cdbe6e5d7e3185892 snort.pre-install" diff --git a/extra/snort/snort.confd b/extra/snort/snort.confd new file mode 100644 index 0000000000..d4d240ac96 --- /dev/null +++ b/extra/snort/snort.confd @@ -0,0 +1,16 @@ +# Config file for /etc/init.d/snort + +# This tell snort which interface to listen on (any for every interface) +IFACE=eth0 + +# Make sure this matches your IFACE +PIDFILE=/var/run/snort_$IFACE.pid + +# You probably don't want to change this, but in case you do +LOGDIR="/var/log/snort" + +# Probably not this either +CONF=/etc/snort/snort.conf + +# This pulls in the options above +SNORT_OPTS="-D -u snort -i $IFACE -l $LOGDIR -c $CONF" diff --git a/extra/snort/snort.initd b/extra/snort/snort.initd new file mode 100644 index 0000000000..a5c2b05c47 --- /dev/null +++ b/extra/snort/snort.initd @@ -0,0 +1,31 @@ +#!/sbin/runscript +# Copyright 1999-2004 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/www/viewcvs.gentoo.org/raw_cvs/gentoo-x86/net-analyzer/snort/files/snort.rc7,v 1.3 2007/04/22 06:21:15 dragonheart Exp $ + +depend() { + need net +} + +checkconfig() { + if [ ! -e $CONF ] ; then + eerror "You need a configuration file to run snort" + eerror "There is an example config in /etc/snort/snort.conf.distrib" + return 1 + fi +} + +start() { + checkconfig || return 1 + ebegin "Starting snort" + start-stop-daemon --start --quiet --exec /usr/bin/snort \ + --pidfile ${PIDFILE} \ + -- ${SNORT_OPTS} >/dev/null 2>&1 + eend $? +} + +stop() { + ebegin "Stopping snort" + start-stop-daemon --stop --quiet --pidfile ${PIDFILE} + eend $? +} diff --git a/extra/snort/snort.pre-install b/extra/snort/snort.pre-install new file mode 100644 index 0000000000..c865dc0790 --- /dev/null +++ b/extra/snort/snort.pre-install @@ -0,0 +1,3 @@ +#!/bin/sh + +adduser -h /var/log/snort -s /bin/false -D snort 2>/dev/null |