main/asterisk: added logrotate script

fixes #85
This commit is contained in:
Natanael Copa 2009-09-02 09:13:14 +00:00
parent 5318c56c86
commit 61be22bdd5
2 changed files with 24 additions and 3 deletions

View File

@ -2,7 +2,7 @@
# Maintainer: Timo Teras <timo.teras@iki.fi>
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"

View File

@ -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
}