summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2009-09-02 09:13:14 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2009-09-02 09:13:14 +0000
commit61be22bdd52ac77d2201029214fe47243bf3f184 (patch)
tree17757936a299384ae7a92d1335f10f81192b408f
parent5318c56c869d95eb8899b4dad06cf4563187e545 (diff)
downloadaports-61be22bdd52ac77d2201029214fe47243bf3f184.tar.bz2
aports-61be22bdd52ac77d2201029214fe47243bf3f184.tar.xz
main/asterisk: added logrotate script
fixes #85
-rw-r--r--main/asterisk/APKBUILD10
-rw-r--r--main/asterisk/asterisk.logrotate17
2 files changed, 24 insertions, 3 deletions
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 <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"
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
+}
+