aboutsummaryrefslogtreecommitdiffstats
path: root/main
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2009-07-24 18:39:00 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2009-07-24 18:39:00 +0000
commit41970a7c2c16088568c16a22f0e66f996080cf9a (patch)
tree864e202dee2173fb10bba3874522be4e14437d10 /main
parent689d64cdc3736bb3e965f5b0181b1db77c7d3240 (diff)
downloadaports-41970a7c2c16088568c16a22f0e66f996080cf9a.tar.bz2
aports-41970a7c2c16088568c16a22f0e66f996080cf9a.tar.xz
main/samba: add logrotate script
fixes #81
Diffstat (limited to 'main')
-rw-r--r--main/samba/APKBUILD5
-rw-r--r--main/samba/samba.logrotate9
2 files changed, 13 insertions, 1 deletions
diff --git a/main/samba/APKBUILD b/main/samba/APKBUILD
index c28a6e2de3..3f63f8c0f5 100644
--- a/main/samba/APKBUILD
+++ b/main/samba/APKBUILD
@@ -12,6 +12,7 @@ makedepends="db-dev popt-dev ncurses-dev openldap-dev heimdal-dev"
source="http://us1.$pkgname.org/$pkgname/ftp/stable/$pkgname-$pkgver.tar.gz
samba.initd
samba.confd
+ samba.logrotate
"
build() {
@@ -40,6 +41,7 @@ build() {
cd "$srcdir"/$pkgname-$pkgver
cp -r examples "$pkgdir"/usr/share/doc/samba/
install -D packaging/RHEL/setup/smbusers "$pkgdir"/etc/samba/smbusers
+ install -Dm644 ../samba.logrotate "$pkgdir"/etc/logrotate.d/samba
}
initscript() {
@@ -96,4 +98,5 @@ tdb() {
md5sums="858cb6c640358be0e81297c5de615a3c samba-3.3.6.tar.gz
1b701fdb22c52c63b3af0e4a286a9329 samba.initd
-c150433426e18261e6e3eed3930e1a76 samba.confd"
+c150433426e18261e6e3eed3930e1a76 samba.confd
+b7cafabfb4fa5b3ab5f2e857d8d1c733 samba.logrotate"
diff --git a/main/samba/samba.logrotate b/main/samba/samba.logrotate
new file mode 100644
index 0000000000..bf957bd747
--- /dev/null
+++ b/main/samba/samba.logrotate
@@ -0,0 +1,9 @@
+/var/log/samba/log.* /var/log/samba/*.log {
+ notifempty
+ missingok
+ sharedscripts
+ copytruncate
+ postrotate
+ /bin/kill -HUP `cat /var/run/samba/*.pid 2>/dev/null` 2>/dev/null || true
+ endscript
+}