From 25461ce3a5afe1dacc216bc01263588d63880fdd Mon Sep 17 00:00:00 2001 From: Stephen Soltesz Date: Thu, 8 Jan 2009 18:05:37 +0000 Subject: [PATCH] start zabbix_agent after installing it... assumes it's in a prod env. fixed path in patch for monitor.spec --- Monitor.spec | 2 +- zabbix.spec | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/Monitor.spec b/Monitor.spec index 117b469..efca5fe 100644 --- a/Monitor.spec +++ b/Monitor.spec @@ -180,7 +180,7 @@ rm -rf $RPM_BUILD_ROOT php /usr/share/%{name}/zabbix/getdefines.php > %{python_sitearch}/monitor/database/zabbixapi/defines.py # apply patches to zabbix -patch -d /var/www/html/zabbix/ -p0 < /usr/share/%{name}/zabbix/zabbix/zabbix-auto-login.diff +patch -d /var/www/html/zabbix/ -p0 < /usr/share/%{name}/zabbix/zabbix-auto-login.diff #chkconfig --add monitor-server #chkconfig monitor-server on diff --git a/zabbix.spec b/zabbix.spec index 484ed8b..e8a89be 100644 --- a/zabbix.spec +++ b/zabbix.spec @@ -155,6 +155,9 @@ TMP_FILE=`mktemp $TMPDIR/zbxtmpXXXXXX` # TODO: setup Server=, Hostname=, SERVER=`grep PLC_MONITOR_HOST /etc/planetlab/plc_config | tr "'" ' ' | awk '{print $2}'` +if [ -z "$SERVER" ] ; then + SERVER=128.112.139.116 +fi HOST=`hostname` sed -e "s#Hostname=.*#Hostname=$HOST#g" \ -e "s#Server=.*#Server=$SERVER#g" \ @@ -180,6 +183,7 @@ rm -f $TMP_FILE chkconfig --add zabbix_agentd chkconfig zabbix_agentd on +service zabbix_agentd start %post server -- 2.43.0