[packages/naemon-core] add logrotate file from naemon-core distribution

glen glen at pld-linux.org
Mon Aug 10 09:54:01 CEST 2015


commit 69f05aa5805aeb5762b11d14a59d4c6159c0e742
Author: Elan Ruusamäe <glen at delfi.ee>
Date:   Mon Aug 10 10:47:13 2015 +0300

    add logrotate file from naemon-core distribution

 naemon-core.spec |  7 +++++--
 naemon.logrotate | 15 +++++++++++++++
 2 files changed, 20 insertions(+), 2 deletions(-)
---
diff --git a/naemon-core.spec b/naemon-core.spec
index dfb408a..ec73be4 100644
--- a/naemon-core.spec
+++ b/naemon-core.spec
@@ -11,6 +11,7 @@ License:	GPL v2
 Group:		Applications/System
 Source0:	http://labs.consol.de/naemon/release/v%{version}/src/%{name}-%{version}.tar.gz
 # Source0-md5:	5eb9c6e9be29b993e8488d58f8b3de23
+Source1:	naemon.logrotate
 URL:		http://www.naemon.org/
 BuildRequires:	chrpath
 BuildRequires:	gperf
@@ -87,7 +88,9 @@ rm $RPM_BUILD_ROOT%{_datadir}/%{name}/documentation/installdox
 
 # Put the new RC sysconfig in place
 install -d $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig
-install -p sample-config/naemon.sysconfig $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/naemon
+cp -p sample-config/naemon.sysconfig $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/naemon
+
+cp -p %{SOURCE1} $RPM_BUILD_ROOT/etc/logrotate.d/naemon
 
 # Install systemd entry
 install -D -p daemon-systemd $RPM_BUILD_ROOT%{systemdunitdir}/naemon.service
@@ -126,7 +129,7 @@ fi
 %{_mandir}/man8/shadownaemon.8*
 %{systemdunitdir}/naemon.service
 %{systemdtmpfilesdir}/naemon.conf
-%config(noreplace) /etc/logrotate.d/naemon
+%config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/naemon
 %dir %{_sysconfdir}/naemon
 %dir %{_sysconfdir}/naemon/conf.d
 %dir %{_sysconfdir}/naemon/conf.d/templates
diff --git a/naemon.logrotate b/naemon.logrotate
new file mode 100644
index 0000000..bd2cb55
--- /dev/null
+++ b/naemon.logrotate
@@ -0,0 +1,15 @@
+/var/log/naemon/naemon.log
+{
+	daily
+	rotate 3650
+	nocompress
+	olddir archives
+	dateext
+	dateformat -%Y%m%d
+	missingok
+	notifempty
+	postrotate
+	  [ -f /var/run/naemon/naemon.pid ] && kill -s USR1 `cat /var/run/naemon/naemon.pid`
+	endscript
+	create 0664 naemon naemon
+}
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/naemon-core.git/commitdiff/2913a875c57a27e6e5ed2695c20295e68adcacb3



More information about the pld-cvs-commit mailing list