X-Git-Url: https://git.tld-linux.org/?p=packages%2Fzabbix.git;a=blobdiff_plain;f=zabbix.spec;h=e6a47653b7c6efd76636f967d630d0646116f25e;hp=577c1752511d2be26f85ff69033b66c0fe84965d;hb=1dff07bbd02451f0d29ba9d5cfd6859be77f70df;hpb=228f0620b13ac9924232fa515b0b1cf46e861834 diff --git a/zabbix.spec b/zabbix.spec index 577c175..e6a4765 100644 --- a/zabbix.spec +++ b/zabbix.spec @@ -413,7 +413,15 @@ EOF fi ln -sf %{_sbindir}/zabbix_server-postgresql %{_sbindir}/zabbix_server || : +%post server +/sbin/chkconfig --add zabbix_server +%service zabbix_server restart + %postun server +if [ "$1" = "0" ]; then + %service -q zabbix_server stop + /sbin/chkconfig --del zabbix_server +fi if [ "$1" = "0" ]; then if [ -L %{_sbindir}/zabbix_server ] ; then rm -f %{_sbindir}/zabbix_server || : @@ -439,6 +447,21 @@ ln -sf %{_sbindir}/zabbix_proxy-postgresql %{_sbindir}/zabbix_proxy || : %post proxy-sqlite3 ln -sf %{_sbindir}/zabbix_proxy-sqlite3 %{_sbindir}/zabbix_proxy || : +%post proxy +/sbin/chkconfig --add zabbix_server +%service zabbix_server restart + +%postun proxy +if [ "$1" = "0" ]; then + %service -q zabbix_proxy stop + /sbin/chkconfig --del zabbix_proxy +fi +if [ "$1" = "0" ]; then + if [ -L %{_sbindir}/zabbix_proxy ] ; then + rm -f %{_sbindir}/zabbix_proxy || : + fi +fi + %files %defattr(644,root,root,755) %doc AUTHORS ChangeLog README