added a logrotate script for the vsys log. over time this will prevent it
authorStephen Soltesz <soltesz@cs.princeton.edu>
Fri, 16 May 2008 21:27:22 +0000 (21:27 +0000)
committerStephen Soltesz <soltesz@cs.princeton.edu>
Fri, 16 May 2008 21:27:22 +0000 (21:27 +0000)
from getting too big.

vsys.logrotate [new file with mode: 0644]
vsys.spec

diff --git a/vsys.logrotate b/vsys.logrotate
new file mode 100644 (file)
index 0000000..1eb2c45
--- /dev/null
@@ -0,0 +1,8 @@
+/var/log/netflow.log {
+    copytruncate
+    compress
+    daily
+    notifempty
+    rotate 5
+    missingok
+}
index 6edf9e9..a502e94 100644 (file)
--- 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