diff options
author | Leonardo Arena <rnalrd@alpinelinux.org> | 2012-07-20 12:44:40 +0000 |
---|---|---|
committer | Leonardo Arena <rnalrd@alpinelinux.org> | 2012-07-20 12:48:04 +0000 |
commit | 7f567b56650dfd67ee2b36e863bbc49a07fc9ab1 (patch) | |
tree | 417eec8beb09176bce42a60e22561bc84ef355d7 /main/snort | |
parent | f1ed814b290153779a7a6df2716beab9d73dfedf (diff) | |
download | aports-7f567b56650dfd67ee2b36e863bbc49a07fc9ab1.tar.bz2 aports-7f567b56650dfd67ee2b36e863bbc49a07fc9ab1.tar.xz |
main/snort: add support for logrotate. Fix log dir permissions
Diffstat (limited to 'main/snort')
-rw-r--r-- | main/snort/APKBUILD | 12 | ||||
-rw-r--r-- | main/snort/snort.initd | 10 |
2 files changed, 18 insertions, 4 deletions
diff --git a/main/snort/APKBUILD b/main/snort/APKBUILD index 05d577b14..b5335451e 100644 --- a/main/snort/APKBUILD +++ b/main/snort/APKBUILD @@ -1,8 +1,9 @@ # Contributor: Michael Mason <ms13sp@gmail.com> +# Contributor: Leonardo Arena <rnalrd@alpinelinux.org> # Maintainer: Natanael Copa <ncopa@alpinelinux.org> pkgname=snort pkgver=2.9.3 -pkgrel=3 +pkgrel=4 pkgdesc="An open source network intrusion prevention and detection system" url="http://www.snort.org/" arch="all" @@ -15,7 +16,9 @@ subpackages="$pkgname-doc $pkgname-dev" source="http://www.snort.org/dl/snort-current/snort-$pkgver.tar.gz snort.initd snort.confd - " + " +pkgusers="snort" +pkggroups="snort" _builddir="$srcdir/$pkgname-$pkgver" @@ -49,9 +52,10 @@ package() { install -D -m 755 ../snort.initd "$pkgdir"/etc/init.d/snort install -D -m 644 ../snort.confd "$pkgdir"/etc/conf.d/snort install -D -m 644 etc/snort.conf "$pkgdir"/etc/snort/snort.conf + install -D -m 644 rpm/snort.logrotate "$pkgdir"/etc/logrotate.d/snort mkdir -p "$pkgdir"/usr/lib/snort_dynamicrules mkdir -p "$pkgdir"/var/lib/snort/rules - mkdir -p "$pkgdir"/var/log/snort + mkdir -m 770 -p "$pkgdir"/var/log/snort && chown snort.snort "$pkgdir"/var/log/snort for file in classification.config reference.config threshold.conf \ unicode.map do @@ -62,5 +66,5 @@ package() { } md5sums="e128f5d5d14dad335dc0c549c7fe2e98 snort-2.9.3.tar.gz -ffda56f7c20f5cea1c37c971e0f1d6c9 snort.initd +b65d10cce3e79f38aa6fb5e0aa494144 snort.initd 446f8d2b3435b8a6be738da978670605 snort.confd" diff --git a/main/snort/snort.initd b/main/snort/snort.initd index baed2dff2..42605f126 100644 --- a/main/snort/snort.initd +++ b/main/snort/snort.initd @@ -3,6 +3,8 @@ # 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 $ +extra_commands="reload" + depend() { need net after firewall @@ -30,3 +32,11 @@ stop() { start-stop-daemon --stop --quiet --pidfile ${PIDFILE} eend $? } + +reload() { + ebegin "Reloading snort rules" + start-stop-daemon --stop --quiet --signal HUP --pidfile ${PIDFILE} + #FIXME + return 0 + eend $? +} |