- rotate /var/log/vcached.log
Mark Huang [Wed, 13 Oct 2004 02:37:02 +0000 (02:37 +0000)]
sysv/vcached.logrotate [new file with mode: 0644]
util-vserver.spec
util-vserver.spec.in

diff --git a/sysv/vcached.logrotate b/sysv/vcached.logrotate
new file mode 100644 (file)
index 0000000..203baba
--- /dev/null
@@ -0,0 +1,10 @@
+/var/log/vcached.log {
+    compress
+    daily
+    notifempty
+    rotate 5
+    missingok
+    postrotate
+        kill -HUP `cat /var/run/vcached.pid 2>/dev/null` 2>/dev/null || true
+    endscript
+}
index 3518824..719665a 100644 (file)
@@ -76,6 +76,8 @@ test "%_initrddir" = %_sysconfdir/init.d || {
 mkdir -p ${RPM_BUILD_ROOT}/bin
 ln -f ${RPM_BUILD_ROOT}%_sbindir/vsh ${RPM_BUILD_ROOT}/bin/vsh
 
+install -D -m 644 sysv/vcached.logrotate ${RPM_BUILD_ROOT}/etc/logrotate.d/vcached
+
 %clean
 rm -rf $RPM_BUILD_ROOT
 
@@ -134,6 +136,7 @@ fi
 %config %_initrddir/*
 %config(noreplace) /etc/vservers.conf
 %config(noreplace) /etc/vcached.conf
+/etc/logrotate.d/vcached
 %dir /etc/vservers
 %attr(0,root,root) %dir /vservers
 %attr(4755,root,root) /usr/sbin/vsh
index 87cb8ef..cb20f1d 100644 (file)
@@ -76,6 +76,8 @@ test "%_initrddir" = %_sysconfdir/init.d || {
 mkdir -p ${RPM_BUILD_ROOT}/bin
 ln -f ${RPM_BUILD_ROOT}%_sbindir/vsh ${RPM_BUILD_ROOT}/bin/vsh
 
+install -D -m 644 sysv/vcached.logrotate ${RPM_BUILD_ROOT}/etc/logrotate.d/vcached
+
 %clean
 rm -rf $RPM_BUILD_ROOT
 
@@ -134,6 +136,7 @@ fi
 %config %_initrddir/*
 %config(noreplace) /etc/vservers.conf
 %config(noreplace) /etc/vcached.conf
+/etc/logrotate.d/vcached
 %dir /etc/vservers
 %attr(0,root,root) %dir /vservers
 %attr(4755,root,root) /usr/sbin/vsh