Fix logrotate should rotate log files as icinga user

fixes #6477
This commit is contained in:
Tim Hardeck 2014-06-13 09:47:26 +02:00 committed by Michael Friedrich
parent dea57e9dcf
commit 74751a4e22
2 changed files with 3 additions and 1 deletions

View File

@ -1,6 +1,7 @@
@CMAKE_INSTALL_FULL_LOCALSTATEDIR@/log/icinga2/icinga2.log @CMAKE_INSTALL_FULL_LOCALSTATEDIR@/log/icinga2/debug.log {
daily
rotate 7
su @ICINGA2_USER@ @ICINGA2_GROUP@
compress
delaycompress
missingok
@ -16,6 +17,7 @@
@CMAKE_INSTALL_FULL_LOCALSTATEDIR@/log/icinga2/error.log {
daily
su @ICINGA2_USER@ @ICINGA2_GROUP@
rotate 90
compress
delaycompress

View File

@ -460,7 +460,7 @@ exit 0
%files common
%defattr(-,root,root,-)
%doc COPYING COPYING.Exceptions README NEWS AUTHORS ChangeLog tools/syntax
%attr(755,-,-) %{_sysconfdir}/logrotate.d/%{name}
%config(noreplace) %attr(755,-,-) %{_sysconfdir}/logrotate.d/%{name}
%attr(0750,%{icinga_user},%{icinga_group}) %dir %{_localstatedir}/spool/%{name}
%attr(0750,%{icinga_user},%{icinga_group}) %dir %{_localstatedir}/spool/%{name}/perfdata
%attr(0750,%{icinga_user},%{icinga_group}) %dir %{_localstatedir}/spool/%{name}/tmp