Create zabbix user and update-alternative for proxy on el6

tags/zabbix-5.0.3-5
Daniel Berteaud 4 years ago
parent a8c53cdfed
commit 507ca3e4d0
  1. 9
      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 \

Loading…
Cancel
Save