X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=zabbix.spec;h=5a5f490d70bb92f6426cc33d4ce6a77888216472;hb=67e0dc97d0df06bc3f9def1d8f765690c945d1a6;hp=3f2e54861ba2c407369156e41fb1fb3a416086f6;hpb=59a5e97c767a90437946aa3aca0c8518df662084;p=monitor.git diff --git a/zabbix.spec b/zabbix.spec index 3f2e548..5a5f490 100644 --- a/zabbix.spec +++ b/zabbix.spec @@ -3,7 +3,7 @@ %define _prefix /usr/local/zabbix Name: zabbix -Version: 1.6.1 +Version: 1.6 Release: 1 Group: System Environment/Daemons License: GPL @@ -11,7 +11,7 @@ Summary: ZABBIX network monitor server Vendor: ZABBIX SIA URL: http://www.zabbix.org Packager: Eugene Grigorjev -Source: zabbix-1.6.1.tar.gz +Source: zabbix-%{version}.tar.gz Autoreq: no Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot @@ -170,11 +170,15 @@ sed -e "s#BASEDIR=/opt/zabbix#BASEDIR=%{_prefix}#g" \ -e "s#PIDFILE=/var/tmp/zabbix_agentd.pid#PIDFILE=%{zabbix_piddir}/zabbix_agentd.pid#g" \ %{zabbix_initdir}/zabbix_agentd > $TMP_FILE cat $TMP_FILE > %{zabbix_initdir}/zabbix_agentd -# TODO: copy to /etc/init.d/ + +# NOTE: Run every runlevel as soon as possible, and stop as late as possible cp %{zabbix_initdir}/zabbix_agentd %{_initrddir} +sed -i -e "s#chkconfig: - 90 10#chkconfig: 2345 12 90#g" \ + %{_initrddir}/zabbix_agentd rm -f $TMP_FILE +chkconfig --add zabbix_agentd chkconfig zabbix_agentd on %post server @@ -205,10 +209,14 @@ sed -e "s#BASEDIR=/opt/zabbix#BASEDIR=%{_prefix}#g" \ -e "s#PIDFILE=/var/tmp/zabbix_server.pid#PIDFILE=%{zabbix_piddir}/zabbix_server.pid#g" \ %{zabbix_initdir}/zabbix_server > $TMP_FILE cat $TMP_FILE > %{zabbix_initdir}/zabbix_server -cp %{zabbix_initdir}/zabbix_server %{_initrddir} - rm -f $TMP_FILE +# NOTE: Run every runlevel as soon as possible, and stop as late as possible +cp %{zabbix_initdir}/zabbix_server %{_initrddir} +sed -i -e "s#chkconfig: - 90 10#chkconfig: 2345 12 90#g" \ + %{_initrddir}/zabbix_server + +chkconfig --add zabbix_server chkconfig zabbix_server on %post gui