]> git.pld-linux.org Git - packages/naemon-core.git/commitdiff
add logrotate file from naemon-core distribution
authorElan Ruusamäe <glen@delfi.ee>
Mon, 10 Aug 2015 07:47:13 +0000 (10:47 +0300)
committerElan Ruusamäe <glen@delfi.ee>
Mon, 10 Aug 2015 07:49:25 +0000 (10:49 +0300)
naemon-core.spec
naemon.logrotate [new file with mode: 0644]

index dfb408a4d4a80e2b04c986a558b4c2a5031ee135..ec73be49f006140719988d53a2b8305b73d0e7ed 100644 (file)
@@ -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 (file)
index 0000000..bd2cb55
--- /dev/null
@@ -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
+}
This page took 0.100129 seconds and 4 git commands to generate.