From 9c04fff12f59373af8582714b89a3fd3d18b4081 Mon Sep 17 00:00:00 2001
From: James Meyer <james.meyer@operamail.com>
Date: Thu, 11 Oct 2012 11:09:29 -0500
Subject: func: add logrotate

refs #853
---
 abs/core/func/PKGBUILD            | 16 +++++++++-------
 abs/core/func/logrotate-func.conf | 14 ++++++++++++++
 2 files changed, 23 insertions(+), 7 deletions(-)
 create mode 100644 abs/core/func/logrotate-func.conf

diff --git a/abs/core/func/PKGBUILD b/abs/core/func/PKGBUILD
index 74c1f60..11bc623 100644
--- a/abs/core/func/PKGBUILD
+++ b/abs/core/func/PKGBUILD
@@ -1,6 +1,6 @@
 pkgname=func
 pkgver=0.25
-pkgrel=11
+pkgrel=12
 pkgdesc="fedora unifed network controller"
 url=""
 license="gpl"
@@ -11,7 +11,7 @@ replaces=()
 backup=('etc/func/minion.conf')
 moddir="pkg/usr/lib/python2.7/site-packages/func/minion/modules/"
 install=func.install
-source=($pkgname-$pkgver.tar.gz  minion.conf power.py pacman.py failed_func fe_restart.py msg.py msg.cfg func_ssl_patch)
+source=($pkgname-$pkgver.tar.gz  minion.conf power.py pacman.py failed_func fe_restart.py msg.py msg.cfg func_ssl_patch logrotate-func.conf)
 arch=('i686' 'x86_64')
 
 build() {
@@ -31,10 +31,11 @@ build() {
 	install -m755 -D $startdir/src/fe_restart.py ${startdir}/${moddir}/fe_restart.py
 	install -m755 -D $startdir/src/failed_func $startdir/pkg/usr/MythVantage/bin/failed_func
 	mkdir -p  $startdir/pkg/var/log/func
-   
-    cd $startdir/pkg
-    find ./usr/bin/*  -exec sed -i 's|#!/usr/bin/python|#!/usr/bin/python2|' {} \;
-    find ./ -name "*.pyc" -print | xargs rm -f
+        install -m644 -D ../logrotate-func.conf $startdir/pkg/etc/logrotate.d/func
+
+        cd $startdir/pkg
+        find ./usr/bin/*  -exec sed -i 's|#!/usr/bin/python|#!/usr/bin/python2|' {} \;
+        find ./ -name "*.pyc" -print | xargs rm -f
 }
 md5sums=('892252004f122c61bb58bb4607553ffe'
          '1e2905074203d5c0557f143a6c50c497'
@@ -44,4 +45,5 @@ md5sums=('892252004f122c61bb58bb4607553ffe'
          'b02a733b7a74569e57521bc3708724a5'
          '7b4266a8031cf7de485bf6b74e57bd74'
          '28e141f04ccbdde1199b41888e102dc9'
-         'b816bdb222e646a7801b218c3a626b0e')
+         'b816bdb222e646a7801b218c3a626b0e'
+         '7d7c8a334f6b46ae1e5e483854b93924')
diff --git a/abs/core/func/logrotate-func.conf b/abs/core/func/logrotate-func.conf
new file mode 100644
index 0000000..0160bdc
--- /dev/null
+++ b/abs/core/func/logrotate-func.conf
@@ -0,0 +1,14 @@
+/var/log/func/audit.log {
+   missingok
+   notifempty
+   rotate 0
+   compress
+   size 512k
+   postrotate
+      if [ -f /service/funcd ]; then
+         sv restart funcd
+      fi
+   endscript
+}
+
+
-- 
cgit v0.12