[zabbix20/el5] Handle logrotate directions properly
Volker Fröhlich
volter at fedoraproject.org
Wed Jun 4 06:50:34 UTC 2014
commit 194018654475938518f42a5ccc8fbf29850601c1
Author: Volker Fröhlich <volker27 at gmx.at>
Date: Tue Jun 3 22:07:39 2014 +0200
Handle logrotate directions properly
zabbix-logrotate.in | 3 +--
zabbix20.spec | 9 +++------
2 files changed, 4 insertions(+), 8 deletions(-)
---
diff --git a/zabbix-logrotate.in b/zabbix-logrotate.in
index c2f9045..ce6a26b 100644
--- a/zabbix-logrotate.in
+++ b/zabbix-logrotate.in
@@ -3,6 +3,5 @@
monthly
notifempty
compress
- create 0664 zabbix zabbix
- su zabbix zabbix
+ create 0664 USER zabbix
}
diff --git a/zabbix20.spec b/zabbix20.spec
index ace31e1..f228775 100644
--- a/zabbix20.spec
+++ b/zabbix20.spec
@@ -223,9 +223,6 @@ Zabbix web frontend for PostgreSQL
%patch0 -p1
%patch1 -p1
-# Logrotate's su option is currently only available in Fedora
-sed -i '/su zabbix zabbix/d' %{SOURCE5}
-
# Remove flash applet
# https://support.zabbix.com/browse/ZBX-4794
%patch2 -p1
@@ -381,11 +378,11 @@ mv $RPM_BUILD_ROOT%{_datadir}/%{srcname}/conf/maintenance.inc.php $RPM_BUILD_ROO
install -m 0644 -p %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/httpd/conf.d/%{srcname}.conf
# Install log rotation
-sed -e 's|COMPONENT|agentd|g' %{SOURCE5} > \
+sed -e 's|COMPONENT|agentd|g; s|USER|zabbix|g' %{SOURCE5} > \
$RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/zabbix-agent
-sed -e 's|COMPONENT|server|g' %{SOURCE5} > \
+sed -e 's|COMPONENT|server|g; s|USER|zabbixsrv|g' %{SOURCE5} > \
$RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/zabbix-server
-sed -e 's|COMPONENT|proxy|g' %{SOURCE5} > \
+sed -e 's|COMPONENT|proxy|g; s|USER|zabbixsrv|g' %{SOURCE5} > \
$RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/zabbix-proxy
# Init scripts
More information about the scm-commits
mailing list