summaryrefslogtreecommitdiffstats
path: root/abs/core/func
diff options
context:
space:
mode:
authorJames Meyer <james.meyer@operamail.com>2012-10-11 16:09:29 (GMT)
committerJames Meyer <james.meyer@operamail.com>2012-10-11 16:09:29 (GMT)
commit9c04fff12f59373af8582714b89a3fd3d18b4081 (patch)
tree1ff75877892580c71393a3200b8a92a9683328de /abs/core/func
parent2b83a2379bcd1be13d6e221baafb56e6f66dcbd4 (diff)
downloadlinhes_pkgbuild-9c04fff12f59373af8582714b89a3fd3d18b4081.zip
linhes_pkgbuild-9c04fff12f59373af8582714b89a3fd3d18b4081.tar.gz
linhes_pkgbuild-9c04fff12f59373af8582714b89a3fd3d18b4081.tar.bz2
func: add logrotate
refs #853
Diffstat (limited to 'abs/core/func')
-rw-r--r--abs/core/func/PKGBUILD16
-rw-r--r--abs/core/func/logrotate-func.conf14
2 files changed, 23 insertions, 7 deletions
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
+}
+
+