From 7cd9fcf90273297b8374719528ebb44e611a3763 Mon Sep 17 00:00:00 2001 From: "Danilo G. Baio (dbaio)" Date: Tue, 19 Feb 2013 12:48:43 -0300 Subject: zabbix2 - fix sync and rcfile --- config/zabbix2/zabbix2.inc | 15 ++++++++------- pkg_config.8.xml | 4 ++-- pkg_config.8.xml.amd64 | 4 ++-- 3 files changed, 12 insertions(+), 11 deletions(-) diff --git a/config/zabbix2/zabbix2.inc b/config/zabbix2/zabbix2.inc index af5b3545..730ef873 100644 --- a/config/zabbix2/zabbix2.inc +++ b/config/zabbix2/zabbix2.inc @@ -154,9 +154,10 @@ function sync_package_zabbix2(){ define('ZABBIX_AGENT_BASE', '/usr/pbi/zabbix2-agent-' . php_uname("m")); define('ZABBIX_PROXY_BASE', '/usr/pbi/zabbix2-proxy-' . php_uname("m")); } - else + else { define('ZABBIX_AGENT_BASE', '/usr/local'); define('ZABBIX_PROXY_BASE', '/usr/local'); + } #check zabbix proxy config if (is_array($config['installedpackages']['zabbixproxy'])){ @@ -287,17 +288,18 @@ EOF; $zproxy_rcfile="/usr/local/etc/rc.d/zabbix2_proxy.sh"; if (is_array($zbproxy_config) && $zbproxy_config['proxyenabled']=="on"){ - $zproxy_start= strtr($dir_checks, array("\r" => "")). "echo \"Starting Zabbix Proxy\"...\n"; + $zproxy_start= strtr($dir_checks, array("\r" => "")). "\necho \"Starting Zabbix Proxy\"...\n"; /* start zabbix proxy */ $zproxy_start .= ZABBIX_PROXY_BASE . "/sbin/zabbix_proxy\n"; $zproxy_stop = "echo \"Stopping Zabbix Proxy\"\n"; - $zproxy_stop .= "/usr/bin/killall zabbix_proxy\n"; + $zproxy_stop .= "/usr/bin/killall zabbix_proxy\n"; + $zproxy_stop .= "/bin/sleep 5\n"; + /* write out rc.d start/stop file */ write_rcfile(array( "file" => "zabbix2_proxy.sh", "start" => $zproxy_start, - "restart" => $zproxy_stop . "\nsleep 5\n" . $zproxy_start, "stop" => $zproxy_stop ) ); @@ -311,7 +313,7 @@ EOF; $zagent_rcfile="/usr/local/etc/rc.d/zabbix2_agentd.sh"; if (is_array($zbagent_config) && $zbagent_config['agentenabled']=="on"){ - $zagent_start .= strtr($dir_checks, array("\r" => "")). "echo \"Starting Zabbix Agent...\"\n"; + $zagent_start .= strtr($dir_checks, array("\r" => "")). "\necho \"Starting Zabbix Agent...\"\n"; $zagent_start .= ZABBIX_AGENT_BASE . "/sbin/zabbix_agentd\n"; $zagent_stop = "echo \"Stopping Zabbix Agent...\"\n"; @@ -322,7 +324,6 @@ EOF; write_rcfile(array( "file" => "zabbix2_agentd.sh", "start" => "$zagent_start", - "restart" => "$zagent_stop\n" . "sleep 5\n" . "{$zagent_start}", "stop" => "$zagent_stop" ) ); @@ -336,4 +337,4 @@ EOF; conf_mount_ro(); } -?> \ No newline at end of file +?> diff --git a/pkg_config.8.xml b/pkg_config.8.xml index dcbd2107..06f13826 100644 --- a/pkg_config.8.xml +++ b/pkg_config.8.xml @@ -1828,7 +1828,7 @@ Monitoring agent. Services http://www.pfsense.org/packages/config/zabbix2/zabbix2-agent.xml - zabbix2-agent-2.0.4 pkg v0.6_2 + zabbix2-agent-2.0.4 pkg v0.6_3 BETA 2.0 zabbix2-agent.xml @@ -1847,7 +1847,7 @@ Monitoring agent proxy. Services http://www.pfsense.org/packages/config/zabbix2/zabbix2-proxy.xml - zabbix2-proxy-2.0.4 pkg v0.6_1 + zabbix2-proxy-2.0.4 pkg v0.6_2 BETA 2.0 zabbix2-proxy.xml diff --git a/pkg_config.8.xml.amd64 b/pkg_config.8.xml.amd64 index 8cb93138..512c5190 100644 --- a/pkg_config.8.xml.amd64 +++ b/pkg_config.8.xml.amd64 @@ -1815,7 +1815,7 @@ Monitoring agent. Services http://www.pfsense.org/packages/config/zabbix2/zabbix2-agent.xml - zabbix2-agent-2.0.4 pkg v0.6_2 + zabbix2-agent-2.0.4 pkg v0.6_3 BETA 2.0 zabbix2-agent.xml @@ -1834,7 +1834,7 @@ Monitoring agent proxy. Services http://www.pfsense.org/packages/config/zabbix2/zabbix2-proxy.xml - zabbix2-proxy-2.0.4 pkg v0.6_1 + zabbix2-proxy-2.0.4 pkg v0.6_2 BETA 2.0 zabbix2-proxy.xml -- cgit v1.2.3