From 61be22bdd52ac77d2201029214fe47243bf3f184 Mon Sep 17 00:00:00 2001 From: Natanael Copa Date: Wed, 2 Sep 2009 09:13:14 +0000 Subject: main/asterisk: added logrotate script fixes #85 --- main/asterisk/APKBUILD | 10 +++++++--- main/asterisk/asterisk.logrotate | 17 +++++++++++++++++ 2 files changed, 24 insertions(+), 3 deletions(-) create mode 100644 main/asterisk/asterisk.logrotate (limited to 'main') diff --git a/main/asterisk/APKBUILD b/main/asterisk/APKBUILD index 7f45fee0b..ec4d449bd 100644 --- a/main/asterisk/APKBUILD +++ b/main/asterisk/APKBUILD @@ -2,7 +2,7 @@ # Maintainer: Timo Teras pkgname=asterisk pkgver=1.6.0.14 -pkgrel=0 +pkgrel=1 pkgdesc="Asterisk: A Module Open Source PBX System" url="http://www.asterisk.org/" license="GPL" @@ -20,7 +20,8 @@ source="http://downloads.digium.com/pub/asterisk/releases/$pkgname-$pkgver.tar.g 103-rundir.patch 201-incomplete.patch asterisk.initd - asterisk.confd" + asterisk.confd + asterisk.logrotate" build() { cd "$srcdir/$pkgname-$pkgver" @@ -55,6 +56,8 @@ build() { install -d "$pkgdir"/var/run/asterisk install -m755 -D "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/$pkgname install -m644 -D "$srcdir"/$pkgname.confd "$pkgdir"/etc/conf.d/$pkgname + install -m644 -D "$srcdir"/$pkgname.logrotate \ + "$pkgdir"/etc/logrotate.d/$pkgname } _find_and_move() { @@ -92,4 +95,5 @@ b00c9d98ce2ad445501248a197c6e436 100-uclibc-daemon.patch 5008f51c737ec91f5047519bc9f25b85 103-rundir.patch 57825b74526187075ff7cb6816c55467 201-incomplete.patch c618b7fdf4a9edf4cde6d8ccd1e32ee6 asterisk.initd -ed31d7ba37bcf8b0346dcf8593c395f0 asterisk.confd" +ed31d7ba37bcf8b0346dcf8593c395f0 asterisk.confd +3e65172275684373e1a25c8a11224411 asterisk.logrotate" diff --git a/main/asterisk/asterisk.logrotate b/main/asterisk/asterisk.logrotate new file mode 100644 index 000000000..30836c5c1 --- /dev/null +++ b/main/asterisk/asterisk.logrotate @@ -0,0 +1,17 @@ +/var/log/asterisk/messages /var/log/asterisk/*log { + missingok + rotate 5 + weekly + create 0640 asterisk asterisk + postrotate + /usr/sbin/asterisk -rx 'logger reload' > /dev/null 2> /dev/null + endscript +} + +/var/log/asterisk/cdr-csv/*csv { + missingok + rotate 5 + monthly + create 0640 asterisk asterisk +} + -- cgit v1.2.3