[packages/zabbix] finish packaging

jajcus jajcus at pld-linux.org
Thu Sep 29 14:23:45 CEST 2016


commit 06317756714be3394d23d944cd0ec33d42d0ec4e
Author: Jacek Konieczny <j.konieczny at eggsoft.pl>
Date:   Thu Sep 29 14:21:08 2016 +0200

    finish packaging
    
    - systemd units added
    - default configuration and built-in paths updated for PLD
    - common files moved to '-common', main package pulls server, agent and
      frontend – this way installing 'zabbix' provides something useful
    - PHP and Java configuration files moved to /etc/zabbix
    
    Release: 0.2

 config.patch          | 103 ++++++++++++++++++++++++
 zabbix.spec           | 212 ++++++++++++++++++++++++++++++++++++--------------
 zabbix.tmpfiles       |   1 +
 zabbix_agentd.service |  11 +++
 zabbix_java.service   |  15 ++++
 zabbix_proxy.service  |  12 +++
 zabbix_server.service |  13 ++++
 7 files changed, 307 insertions(+), 60 deletions(-)
---
diff --git a/zabbix.spec b/zabbix.spec
index 30d5888..568a4d0 100644
--- a/zabbix.spec
+++ b/zabbix.spec
@@ -1,6 +1,5 @@
-# TODO
-# - systemd units for zabbix-agentd, zabbix-server and zabbix-java
-# - initscript for zabbix-agentd, zabbix-server and zabbix-java
+# TODO:
+# - initscript for zabbix-agentd, zabbix-server, zabbix-proxy and zabbix-java
 #
 # Conditional build:
 %bcond_with	pgsql 	# enable PostgreSQL support
@@ -20,16 +19,22 @@ ERROR: exactly one database must be selected
 
 %define         php_min_version 5.4.0
 
-Summary:	zabbix - network monitoring software
-Summary(pl.UTF-8):	zabbix - oprogramowanie do monitorowania sieci
+Summary:	Zabbix - network monitoring software
+Summary(pl.UTF-8):	Zabbix - oprogramowanie do monitorowania sieci
 Name:		zabbix
 Version:	3.2.0
-Release:	0.1
+Release:	0.2
 License:	GPL v2+
 Group:		Networking/Utilities
 Source0:	http://dl.sourceforge.net/zabbix/%{name}-%{version}.tar.gz
 # Source0-md5:	e2491b482868059f251902d5f636eacb
 Source1:	%{name}-apache.conf
+Source2:	zabbix_server.service
+Source3:	zabbix_agentd.service
+Source4:	zabbix_proxy.service
+Source5:	zabbix_java.service
+Source6:	zabbix.tmpfiles
+Patch0:		config.patch
 URL:		http://zabbix.sourceforge.net/
 BuildRequires:	OpenIPMI-devel
 BuildRequires:	curl-devel
@@ -44,15 +49,10 @@ BuildRequires:	openssl-devel >= 0.9.7d
 %{?with_pgsql:BuildRequires:	postgresql-devel}
 %{?with_sqlite3:BuildRequires:	sqlite3-devel}
 BuildRequires:	unixODBC-devel
-BuildRequires:	rpmbuild(macros) >= 1.268
-Requires(postun):	/usr/sbin/groupdel
-Requires(postun):	/usr/sbin/userdel
-Requires(pre):	/bin/id
-Requires(pre):	/usr/bin/getgid
-Requires(pre):	/usr/sbin/groupadd
-Requires(pre):	/usr/sbin/useradd
-Provides:	group(zabbix)
-Provides:	user(zabbix)
+BuildRequires:	rpmbuild(macros) >= 1.671
+Requires:	zabbix-server
+Requires:	zabbix-agentd
+Requires:	zabbix-frontend-php
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %define		_sysconfdir	/etc/%{name}
@@ -61,44 +61,64 @@ BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 %define		_webapp		%{name}
 
 %description
-zabbix is software that monitors numerous parameters of a network and
+Zabbix is software that monitors numerous parameters of a network and
 the servers on that network. It is a useful tool for monitoring
-the health and integrity of servers. zabbix uses a flexible
+the health and integrity of servers. Zabbix uses a flexible
 notification mechanism that allows users to configure email based
 alerts for virtually any event. All monitored parameters are stored in
-a database. zabbix offers excellent reporting and data visualisation
-features based on the stored data. zabbix supports both polling and
-trapping. All zabbix reports and statistics, as well as configuration
+a database. Zabbix offers excellent reporting and data visualisation
+features based on the stored data. Zabbix supports both polling and
+trapping. All Zabbix reports and statistics, as well as configuration
 parameters, are accessed through a web-based front end.
 
 %description -l pl.UTF-8
-zabbix to oprogramowanie do monitorowania licznych parametrów sieci i
+Zabbix to oprogramowanie do monitorowania licznych parametrów sieci i
 serwerów sieciowych. Jest przydatny przy monitorowaniu działania
 serwerów. Jorzysta z elastycznego mechanizmu powiadamiania, który
 pozwala użytkownikom konfigurować powiadamianie pocztą elektroniczną
 dla praktycznie wszelkich zdarzeń. Monitorowane parametry są
-przechowywane w bazie danych. W oparciu o przechowywane dane zabbix
+przechowywane w bazie danych. W oparciu o przechowywane dane Zabbix
 oferuje świetne raportowanie i funkcje wizualizacji. Wspiera zarówno
 odpytywanie jak i pułapkowanie. Dostęp do wszystkich raportów i
-statystyk zabbiksa jest możliwy poprzez interfejs oparty o WWW.
+statystyk Zabbiksa jest możliwy poprzez interfejs oparty o WWW.
+
+%package common
+Summary:	Common files for Zabbix monitoring software
+Summary(pl.UTF-8):	Wspólne pliki dla oprogramowania monitorującego Zabbix
+Group:		Networking/Utilities
+Requires(postun):	/usr/sbin/groupdel
+Requires(postun):	/usr/sbin/userdel
+Requires(pre):	/bin/id
+Requires(pre):	/usr/bin/getgid
+Requires(pre):	/usr/sbin/groupadd
+Requires(pre):	/usr/sbin/useradd
+Provides:	group(zabbix)
+Provides:	user(zabbix)
+
+%description common
+Common files for Zabbix monitoring software.
+
+%description common -l pl.UTF-8
+Wspólne pliki dla oprogramowania monitorującego Zabbix.
 
 %package agentd
-Summary:	Standalone agent for zabbix
-Summary(pl.UTF-8):	Wersja wolnostojąca agenta zabbiksa
+Summary:	Zabbix Agent
+Summary(pl.UTF-8):	Agenta Zabbiksa
 Group:		Networking/Utilities
-Requires:	%{name} = %{version}-%{release}
+Requires:	systemd-units >= 38
+Requires:	%{name}-common = %{version}-%{release}
 Obsoletes:	zabbix-agent-inetd
 Obsoletes:	zabbix-agent-standalone
 
 %description agentd
-This package provides the zabbix agent.
+Zabbix agent collects data from the local system for a Zabbix server.
 
 %description agentd -l pl.UTF-8
-Ten pakiet dostarcza agenta zabbiksa.
+Agent zbiera dane z lokalnej maszyny dla serwera Zabbix.
 
 %package frontend-php
-Summary:	PHP frontend for zabbix
-Summary(pl.UTF-8):	Interfejs PHP dla zabbiksa
+Summary:	PHP frontend for Zabbix
+Summary(pl.UTF-8):	Interfejs PHP dla Zabbiksa
 Group:		Applications/WWW
 Requires:	php(bcmath)
 Requires:	php(core) >= %{php_min_version}
@@ -118,63 +138,67 @@ Requires:	webapps
 Requires:	webserver(php)
 
 %description frontend-php
-This package provides web based (PHP) frontend for zabbix.
+This package provides web based (PHP) frontend for Zabbix.
 
 %description frontend-php -l pl.UTF-8
-Ten pakiet dostarcza napisany w PHP frontend dla zabbiksa.
+Ten pakiet dostarcza napisany w PHP frontend dla Zabbiksa.
 
 %package get
-Summary:	Program retrieving data from zabbix agent
-Summary(pl.UTF-8):	Program odpytujÄcy agenta zabbiksa
+Summary:	Program retrieving data from Zabbix agent
+Summary(pl.UTF-8):	Program odpytujÄcy agenta Zabbiksa
 Group:		Networking/Utilities
 
 %description get
-This package provides a program retrieving data from zabbix agent.
+This package provides a program retrieving data from Zabbix agent.
 
 %description get -l pl.UTF-8
-Ten pakiet zawiera program odpytujÄcy agenta zabbiksa.
+Ten pakiet zawiera program odpytujÄcy agenta Zabbiksa.
 
 %package proxy
 Summary:	Zabbix proxy
-Summary(pl.UTF-8):	Proxy do zabbiksa
+Summary(pl.UTF-8):	Proxy do Zabbiksa
 Group:		Networking/Utilities
+Requires:	systemd-units >= 38
+Requires:	%{name}-common = %{version}-%{release}
 
 %description proxy
-This package provides the zabbix proxy.
+This package provides the Zabbix proxy.
 
 %description proxy -l pl.UTF-8
-Ten pakiet zawiera proxy zabbix.
+Ten pakiet zawiera proxy Zabbix.
 
 %package sender
 Summary:	Zabbix sender
-Summary(pl.UTF-8):	Program zawiadamiający zabbiksa
+Summary(pl.UTF-8):	Program zawiadamiający Zabbiksa
 Group:		Networking/Utilities
 
 %description sender
-This package provides the zabbix sender.
+This package provides the Zabbix sender.
 
 %description sender -l pl.UTF-8
-Ten pakiet zawiera program zawiadamiający zabbiksa.
+Ten pakiet zawiera program zawiadamiający Zabbiksa.
 
 %package server
 Summary:	Zabbix server
-Summary(pl.UTF-8):	Serwer zabbiksa
+Summary(pl.UTF-8):	Serwer Zabbiksa
 Group:		Networking/Utilities
-Requires:	%{name} = %{version}-%{release}
+Requires:	systemd-units >= 38
+Requires:	%{name}-common = %{version}-%{release}
 Obsoletes:	%{name}-suckerd
 Obsoletes:	%{name}-trapper-inetd
 Obsoletes:	%{name}-trapper-standalone
 
 %description server
-This package provides the zabbix server.
+This package provides the Zabbix server.
 
 %description server -l pl.UTF-8
-Ten pakiet zawiera serwer zabbiksa.
+Ten pakiet zawiera serwer Zabbiksa.
 
 %package java
 Summary:	Zabbix Java Gateway
 Group:		Networking/Utilities
-Requires:	%{name} = %{version}-%{release}
+Requires:	systemd-units >= 38
+Requires:	%{name}-common = %{version}-%{release}
 
 %description java
 This package provides the Zabbix Java Gateway.
@@ -182,10 +206,12 @@ This package provides the Zabbix Java Gateway.
 %prep
 %setup -q
 
+%patch0 -p1
+
 %build
 %configure \
 	%{?with_mysql:--with-mysql} \
-	%{?with_pgsql:--with-pgsql} \
+	%{?with_pgsql:--with-postgresql} \
 	%{?with_oracle:--with-oracle} \
 	%{?with_sqlite3:--with-sqlite3} \
 	--enable-server \
@@ -207,21 +233,36 @@ This package provides the Zabbix Java Gateway.
 
 %install
 rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT{%{_sysconfdir},/etc/webapps/%{_webapp},%{_appdir}}
+install -d $RPM_BUILD_ROOT{%{_sysconfdir},/etc/webapps/%{_webapp},%{_appdir}} \
+	$RPM_BUILD_ROOT{/run/zabbix,/var/log/zabbix,%{systemdunitdir},%{tmpfilesdir}}
 
 %{__make} install \
 	DESTDIR=$RPM_BUILD_ROOT \
 	ZJG_DEST=$RPM_BUILD_ROOT%{_datadir}/zabbix_java
 
 cp -r frontends $RPM_BUILD_ROOT%{_appdir}
-#mv -f $RPM_BUILD_ROOT%{_appdir}/frontends/php/include/db.inc.php $RPM_BUILD_ROOT%{_webapps}/%{_webapp}
-#ln -s %{_webapps}/%{_webapp}/db.inc.php $RPM_BUILD_ROOT%{_appdir}/frontends/php/include
+
 install %{SOURCE1} $RPM_BUILD_ROOT%{_webapps}/%{_webapp}/apache.conf
 install %{SOURCE1} $RPM_BUILD_ROOT%{_webapps}/%{_webapp}/httpd.conf
 
+install	%{SOURCE2} $RPM_BUILD_ROOT%{systemdunitdir}/zabbix_server.service
+install	%{SOURCE3} $RPM_BUILD_ROOT%{systemdunitdir}/zabbix_agentd.service
+install	%{SOURCE4} $RPM_BUILD_ROOT%{systemdunitdir}/zabbix_proxy.service
+install	%{SOURCE5} $RPM_BUILD_ROOT%{systemdunitdir}/zabbix_java.service
+
+install %{SOURCE6} $RPM_BUILD_ROOT%{tmpfilesdir}/zabbix.conf
+
+mv $RPM_BUILD_ROOT%{_appdir}/frontends/php/conf $RPM_BUILD_ROOT%{_sysconfdir}/frontend
+ln -s %{_sysconfdir}/frontend $RPM_BUILD_ROOT%{_appdir}/frontends/php/conf
+touch $RPM_BUILD_ROOT%{_sysconfdir}/frontend/zabbix.conf.php
+
 %if %{with java}
 mv $RPM_BUILD_ROOT%{_datadir}/zabbix_java/settings.sh $RPM_BUILD_ROOT%{_sysconfdir}/zabbix_java.conf
 ln -s %{_sysconfdir}/zabbix_java.conf $RPM_BUILD_ROOT%{_datadir}/zabbix_java/settings.sh
+mv $RPM_BUILD_ROOT%{_datadir}/zabbix_java/lib/logback.xml $RPM_BUILD_ROOT%{_sysconfdir}/java-logback.xml
+ln -s %{_sysconfdir}/java-logback.xml $RPM_BUILD_ROOT%{_datadir}/zabbix_java/lib/logback.xml
+mv $RPM_BUILD_ROOT%{_datadir}/zabbix_java/lib/logback-console.xml $RPM_BUILD_ROOT%{_sysconfdir}/java-logback-console.xml
+ln -s %{_sysconfdir}/java-logback-console.xml $RPM_BUILD_ROOT%{_datadir}/zabbix_java/lib/logback-console.xml
 
 cat >$RPM_BUILD_ROOT%{_sbindir}/zabbix_java-start <<'EOF'
 #!/bin/sh
@@ -251,10 +292,16 @@ rm -rf $RPM_BUILD_ROOT
 %triggerun frontend-php -- apache < 2.2.0, apache-base
 %webapp_unregister httpd %{_webapp}
 
-%pre
+%pre common
 %groupadd -g 111 zabbix
 %useradd -d / -u 111 -g zabbix -c "Zabbix User" -s /bin/false zabbix
 
+%postun common
+if [ "$1" = "0" ]; then
+	%userremove zabbix
+	%groupremove zabbix
+fi
+
 %post server
 if [ "$1" = 1 ]; then
 	%banner -e %{name}-server <<-EOF
@@ -263,8 +310,8 @@ if [ "$1" = 1 ]; then
 	Running these should be fine in most cases:
 	psql -c 'create database zabbix'
 	zcat %{_docdir}/%{name}-server-%{version}/postgresql/schema.sql.gz | psql zabbix
-	zcat %{_docdir}/%{name}-server-%{version}/postgresql/data.sql.gz | psql zabbix
 	zcat %{_docdir}/%{name}-server-%{version}/postgresql/images.sql.gz | psql zabbix
+	zcat %{_docdir}/%{name}-server-%{version}/postgresql/data.sql.gz | psql zabbix
 %else
 %if %{with mysql}
 	Running these should be fine in most cases:
@@ -279,31 +326,71 @@ if [ "$1" = 1 ]; then
 	%{?TODO:You also need zabbix-agent. install zabbix-agentd.}
 EOF
 fi
+%systemd_post zabbix_server.service
 
-%postun
-if [ "$1" = "0" ]; then
-	%userremove zabbix
-	%groupremove zabbix
-fi
+%preun server
+%systemd_preun zabbix_server.service
+
+%postun server
+%systemd_reload
+
+%post agentd
+%systemd_post zabbix_agentd.service
+
+%preun agentd
+%systemd_preun zabbix_agentd.service
+
+%postun agentd
+%systemd_reload
+
+%post proxy
+%systemd_post zabbix_proxy.service
+
+%preun proxy
+%systemd_preun zabbix_proxy.service
+
+%postun proxy
+%systemd_reload
+
+%post java
+%systemd_post zabbix_java.service
+
+%preun java
+%systemd_preun zabbix_java.service
+
+%postun java
+%systemd_reload
 
 %files
 %defattr(644,root,root,755)
 %doc AUTHORS ChangeLog README
-%attr(750,root,zabbix) %dir %{_sysconfdir}
+
+%files common
+%defattr(644,root,root,755)
+%doc AUTHORS ChangeLog README
+%attr(751,root,zabbix) %dir %{_sysconfdir}
+%attr(751,root,http) %dir %{_sysconfdir}/frontend
 %dir %{_appdir}
 %dir %{_appdir}/frontends
+%dir %attr(770,root,zabbix) /run/zabbix
+%dir %attr(775,root,zabbix) /var/log/zabbix
 
 %files agentd
 %defattr(644,root,root,755)
 %attr(640,root,zabbix) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/zabbix_agentd.conf
 %attr(755,root,root) %{_sbindir}/zabbix_agentd
 %{_mandir}/man8/zabbix_agentd*
+%{systemdunitdir}/zabbix_agentd.service
 
 %files frontend-php
 %defattr(644,root,root,755)
 %attr(750,root,http) %dir %{_webapps}/%{_webapp}
 %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_webapps}/%{_webapp}/*
 %{_appdir}/frontends/php
+%ghost %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/frontend/zabbix.conf.php
+%attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/frontend/.htaccess
+%attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/frontend/maintenance.inc.php
+%attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/frontend/zabbix.conf.php.example
 
 %files get
 %defattr(644,root,root,755)
@@ -315,6 +402,7 @@ fi
 %attr(640,root,zabbix) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/zabbix_proxy.conf
 %attr(755,root,root) %{_sbindir}/zabbix_proxy
 %{_mandir}/man8/zabbix_proxy*
+%{systemdunitdir}/zabbix_proxy.service
 
 %files sender
 %defattr(644,root,root,755)
@@ -327,7 +415,7 @@ fi
 %if %{with mysql}
 %doc database/mysql
 %endif
-%if %{with postgresql}
+%if %{with pgsql}
 %doc database/postgresql
 %endif
 %if %{with oracle}
@@ -339,6 +427,7 @@ fi
 %attr(640,root,zabbix) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/zabbix_server.conf
 %attr(755,root,root) %{_sbindir}/zabbix_server
 %{_mandir}/man8/zabbix_server*
+%{systemdunitdir}/zabbix_server.service
 
 %if %{with java}
 %files java
@@ -346,10 +435,13 @@ fi
 %attr(755,root,root) %{_sbindir}/zabbix_java-start
 %attr(755,root,root) %{_sbindir}/zabbix_java-stop
 %attr(640,root,zabbix) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/zabbix_java.conf
+%attr(640,root,zabbix) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/java-logback.xml
+%attr(640,root,zabbix) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/java-logback-console.xml
 %dir %{_datadir}/zabbix_java
 %{_datadir}/zabbix_java/bin
 %{_datadir}/zabbix_java/lib
 %{_datadir}/zabbix_java/settings.sh
 %attr(755,root,root) %{_datadir}/zabbix_java/shutdown.sh
 %attr(755,root,root) %{_datadir}/zabbix_java/startup.sh
+%{systemdunitdir}/zabbix_java.service
 %endif
diff --git a/config.patch b/config.patch
new file mode 100644
index 0000000..af5550c
--- /dev/null
+++ b/config.patch
@@ -0,0 +1,103 @@
+diff -dur zabbix-3.2.0.orig/conf/zabbix_agentd.conf zabbix-3.2.0/conf/zabbix_agentd.conf
+--- zabbix-3.2.0.orig/conf/zabbix_agentd.conf	2016-09-13 14:20:55.000000000 +0200
++++ zabbix-3.2.0/conf/zabbix_agentd.conf	2016-09-29 14:05:11.000000000 +0200
+@@ -9,6 +9,7 @@
+ # Mandatory: no
+ # Default:
+ # PidFile=/tmp/zabbix_agentd.pid
++PidFile=/run/zabbix/zabbix_agentd.pid
+ 
+ ### Option: LogType
+ #	Specifies where log messages are written to:
+@@ -27,7 +28,7 @@
+ # Default:
+ # LogFile=
+ 
+-LogFile=/tmp/zabbix_agentd.log
++LogFile=/var/log/zabbix/zabbix_agentd.log
+ 
+ ### Option: LogFileSize
+ #	Maximum size of log file in MB.
+diff -dur zabbix-3.2.0.orig/conf/zabbix_proxy.conf zabbix-3.2.0/conf/zabbix_proxy.conf
+--- zabbix-3.2.0.orig/conf/zabbix_proxy.conf	2016-09-13 14:20:55.000000000 +0200
++++ zabbix-3.2.0/conf/zabbix_proxy.conf	2016-09-29 14:05:11.000000000 +0200
+@@ -82,7 +82,7 @@
+ # Default:
+ # LogFile=
+ 
+-LogFile=/tmp/zabbix_proxy.log
++LogFile=/var/log/zabbix/zabbix_proxy.log
+ 
+ ### Option: LogFileSize
+ #	Maximum size of log file in MB.
+@@ -112,7 +112,7 @@
+ #
+ # Mandatory: no
+ # Default:
+-# PidFile=/tmp/zabbix_proxy.pid
++PidFile=/run/zabbix/zabbix_proxy.pid
+ 
+ ### Option: DBHost
+ #	Database host name.
+diff -dur zabbix-3.2.0.orig/conf/zabbix_server.conf zabbix-3.2.0/conf/zabbix_server.conf
+--- zabbix-3.2.0.orig/conf/zabbix_server.conf	2016-09-13 14:20:55.000000000 +0200
++++ zabbix-3.2.0/conf/zabbix_server.conf	2016-09-29 14:05:11.000000000 +0200
+@@ -35,7 +35,7 @@
+ # Default:
+ # LogFile=
+ 
+-LogFile=/tmp/zabbix_server.log
++LogFile=/var/log/zabbix/zabbix_server.log
+ 
+ ### Option: LogFileSize
+ #	Maximum size of log file in MB.
+@@ -65,7 +65,7 @@
+ #
+ # Mandatory: no
+ # Default:
+-# PidFile=/tmp/zabbix_server.pid
++PidFile=/run/zabbix/zabbix_server.pid
+ 
+ ### Option: DBHost
+ #	Database host name.
+diff -dur zabbix-3.2.0.orig/src/zabbix_java/lib/logback.xml zabbix-3.2.0/src/zabbix_java/lib/logback.xml
+--- zabbix-3.2.0.orig/src/zabbix_java/lib/logback.xml	2016-09-13 14:20:55.000000000 +0200
++++ zabbix-3.2.0/src/zabbix_java/lib/logback.xml	2016-09-29 14:07:41.000000000 +0200
+@@ -2,10 +2,10 @@
+ 
+ 	<appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
+ 
+-		<file>/tmp/zabbix_java.log</file>
++		<file>/var/log/zabbix/zabbix_java.log</file>
+ 
+ 		<rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
+-			<fileNamePattern>/tmp/zabbix_java.log.%i</fileNamePattern>
++			<fileNamePattern>/var/log/zabbix/zabbix_java.log.%i</fileNamePattern>
+ 			<minIndex>1</minIndex>
+ 			<maxIndex>3</maxIndex>
+ 		</rollingPolicy>
+diff -dur zabbix-3.2.0.orig/src/zabbix_java/settings.sh zabbix-3.2.0/src/zabbix_java/settings.sh
+--- zabbix-3.2.0.orig/src/zabbix_java/settings.sh	2016-09-13 14:20:55.000000000 +0200
++++ zabbix-3.2.0/src/zabbix_java/settings.sh	2016-09-29 14:05:32.000000000 +0200
+@@ -24,7 +24,7 @@
+ # Default:
+ # PID_FILE=
+ 
+-PID_FILE="/tmp/zabbix_java.pid"
++PID_FILE="/run/zabbix/zabbix_java.pid"
+ 
+ ### Option: zabbix.startPollers
+ #	Number of worker threads to start.
+diff -dur zabbix-3.2.0.orig/frontends/php/include/classes/setup/CSetupWizard.php zabbix-3.2.0/frontends/php/include/classes/setup/CSetupWizard.php
+--- zabbix-3.2.0.orig/frontends/php/include/classes/setup/CSetupWizard.php	2016-09-13 14:21:05.000000000 +0200
++++ zabbix-3.2.0/frontends/php/include/classes/setup/CSetupWizard.php	2016-09-29 12:43:27.000000000 +0200
+@@ -386,7 +386,7 @@
+ 				new CTag('p', true, _('Alternatively, you can install it manually:')),
+ 				new CTag('ol', true, [
+ 					new CTag('li', true, new CLink(_('Download the configuration file'), 'setup.php?save_config=1')),
+-					new CTag('li', true, _s('Save it as "%1$s"', $config_file_name))
++					new CTag('li', true, _s('Save it as "%1$s"', '/etc/zabbix/frontend/zabbix.conf.php'))
+ 				]),
+ 			];
+ 		}
+Only in zabbix-3.2.0/frontends/php/include/classes/setup: CSetupWizard.php~
diff --git a/zabbix.tmpfiles b/zabbix.tmpfiles
new file mode 100644
index 0000000..bb46de8
--- /dev/null
+++ b/zabbix.tmpfiles
@@ -0,0 +1 @@
+d /run/zabbix 0770 root zabbix -
diff --git a/zabbix_agentd.service b/zabbix_agentd.service
new file mode 100644
index 0000000..34b7a66
--- /dev/null
+++ b/zabbix_agentd.service
@@ -0,0 +1,11 @@
+[Unit]
+Description=Zabbix agent
+
+[Service]
+Type=forking
+ExecStart=/usr/sbin/zabbix_agentd
+Restart=on-failure
+PIDFile=/run/zabbix/zabbix_agentd.pid
+
+[Install]
+WantedBy=multi-user.target
diff --git a/zabbix_java.service b/zabbix_java.service
new file mode 100644
index 0000000..4a2b190
--- /dev/null
+++ b/zabbix_java.service
@@ -0,0 +1,15 @@
+[Unit]
+Description=Zabbix Java Gateway
+
+[Service]
+Type=forking
+ExecStart=/usr/sbin/zabbix_java-start
+ExecStop=/usr/sbin/zabbix_java-stop
+Restart=on-failure
+PIDFile=/run/zabbix/zabbix_java.pid
+User=zabbix
+Group=zabbix
+SuccessExitStatus=0 143 SIGTERM
+
+[Install]
+WantedBy=multi-user.target
diff --git a/zabbix_proxy.service b/zabbix_proxy.service
new file mode 100644
index 0000000..513ef98
--- /dev/null
+++ b/zabbix_proxy.service
@@ -0,0 +1,12 @@
+[Unit]
+Description=Zabbix proxy
+
+[Service]
+Type=forking
+ExecStart=/usr/sbin/zabbix_proxy
+ExecReload=/usr/sbin/zabbix_proxy -R config_cache_reload
+Restart=on-failure
+PIDFile=/run/zabbix/zabbix_proxy.pid
+
+[Install]
+WantedBy=multi-user.target
diff --git a/zabbix_server.service b/zabbix_server.service
new file mode 100644
index 0000000..addc3d6
--- /dev/null
+++ b/zabbix_server.service
@@ -0,0 +1,13 @@
+[Unit]
+Description=Zabbix server
+After=mysql.service postgresql.service
+
+[Service]
+Type=forking
+ExecStart=/usr/sbin/zabbix_server
+ExecReload=/usr/sbin/zabbix_server -R config_cache_reload
+Restart=on-failure
+PIDFile=/run/zabbix/zabbix_server.pid
+
+[Install]
+WantedBy=multi-user.target
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/zabbix.git/commitdiff/06317756714be3394d23d944cd0ec33d42d0ec4e



More information about the pld-cvs-commit mailing list