diff --git a/zabbix.spec b/zabbix.spec index bde1430..046a14a 100644 --- a/zabbix.spec +++ b/zabbix.spec @@ -780,6 +780,8 @@ getent passwd zabbix > /dev/null || \ useradd -r -g zabbix -d %{_localstatedir}/lib/zabbix -s /sbin/nologin \ -c "Zabbix Monitoring System" zabbix : +%endif + %pre proxy-mysql getent group zabbix > /dev/null || groupadd -r zabbix @@ -788,12 +790,14 @@ getent passwd zabbix > /dev/null || \ -c "Zabbix Monitoring System" zabbix : +%if 0%{?rhel} >= 7 %pre proxy-pgsql getent group zabbix > /dev/null || groupadd -r zabbix getent passwd zabbix > /dev/null || \ useradd -r -g zabbix -d %{_localstatedir}/lib/zabbix -s /sbin/nologin \ -c "Zabbix Monitoring System" zabbix : +%endif %pre proxy-sqlite3 getent group zabbix > /dev/null || groupadd -r zabbix @@ -802,6 +806,7 @@ getent passwd zabbix > /dev/null || \ -c "Zabbix Monitoring System" zabbix : +%if 0%{?rhel} >= 7 %pre server-mysql getent group zabbix > /dev/null || groupadd -r zabbix getent passwd zabbix > /dev/null || \ @@ -815,6 +820,7 @@ getent passwd zabbix > /dev/null || \ useradd -r -g zabbix -d %{_localstatedir}/lib/zabbix -s /sbin/nologin \ -c "Zabbix Monitoring System" zabbix : +%endif %post proxy-mysql %systemd_post zabbix-proxy.service @@ -822,11 +828,13 @@ getent passwd zabbix > /dev/null || \ zabbix-proxy %{_sbindir}/zabbix_proxy_mysql 10 : +%if 0%{?rhel} >= 7 %post proxy-pgsql %systemd_post zabbix-proxy.service /usr/sbin/update-alternatives --install %{_sbindir}/zabbix_proxy \ zabbix-proxy %{_sbindir}/zabbix_proxy_pgsql 10 : +%endif %post proxy-sqlite3 %systemd_post zabbix-proxy.service @@ -834,6 +842,7 @@ getent passwd zabbix > /dev/null || \ zabbix-proxy %{_sbindir}/zabbix_proxy_sqlite3 10 : +%if 0%{?rhel} >= 7 %post server-mysql %systemd_post zabbix-server.service /usr/sbin/update-alternatives --install %{_sbindir}/zabbix_server \