From: Stephen Soltesz <soltesz@cs.princeton.edu>
Date: Fri, 16 May 2008 21:27:22 +0000 (+0000)
Subject: added a logrotate script for the vsys log.  over time this will prevent it
X-Git-Tag: vsys-0.7-7~2
X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=81ff2b79dc845159b68502905dfee2b581bd5a6d;p=vsys.git

added a logrotate script for the vsys log.  over time this will prevent it
from getting too big.
---

diff --git a/vsys.logrotate b/vsys.logrotate
new file mode 100644
index 0000000..1eb2c45
--- /dev/null
+++ b/vsys.logrotate
@@ -0,0 +1,8 @@
+/var/log/netflow.log {
+    copytruncate
+    compress
+    daily
+    notifempty
+    rotate 5
+    missingok
+}
diff --git a/vsys.spec b/vsys.spec
index 6edf9e9..a502e94 100644
--- a/vsys.spec
+++ b/vsys.spec
@@ -55,6 +55,8 @@ cp vsys $RPM_BUILD_ROOT/usr/bin
 cp vsys-initscript $RPM_BUILD_ROOT/etc/init.d/vsys
 cp vsys.conf $RPM_BUILD_ROOT/etc
 
+install -D -m 644 vsys.logrotate $RPM_BUILD_ROOT/%{_sysconfdir}/logrotate.d/vsys
+
 %clean
 rm -rf $RPM_BUILD_ROOT
 
@@ -63,6 +65,7 @@ rm -rf $RPM_BUILD_ROOT
 /etc/init.d/vsys
 /vsys/*
 /etc/vsys.conf
+%{_sysconfdir}/logrotate.d/vsys
 
 %post
 chkconfig --add vsys