aboutsummaryrefslogtreecommitdiffstats
path: root/config/zabbix-lts/zabbix-lts.inc
diff options
context:
space:
mode:
authorRenato Botelho <garga@FreeBSD.org>2015-05-14 10:42:36 -0300
committerRenato Botelho <garga@FreeBSD.org>2015-05-14 10:42:36 -0300
commit5b319c946be102bec4d7f21eb7eff42e85ceb4b4 (patch)
treea91061e520dfec192e22f8a1d1614d6cd3c4a75d /config/zabbix-lts/zabbix-lts.inc
parent0c9a566a742e665ddfb856e6ac7b33596871525c (diff)
downloadpfsense-packages-5b319c946be102bec4d7f21eb7eff42e85ceb4b4.tar.gz
pfsense-packages-5b319c946be102bec4d7f21eb7eff42e85ceb4b4.tar.bz2
pfsense-packages-5b319c946be102bec4d7f21eb7eff42e85ceb4b4.zip
Sanitize zabbix LTS version, add run_depends, port_category and fix pbi detection for 2.3+
Diffstat (limited to 'config/zabbix-lts/zabbix-lts.inc')
-rw-r--r--config/zabbix-lts/zabbix-lts.inc16
1 files changed, 9 insertions, 7 deletions
diff --git a/config/zabbix-lts/zabbix-lts.inc b/config/zabbix-lts/zabbix-lts.inc
index 450b78a1..af446261 100644
--- a/config/zabbix-lts/zabbix-lts.inc
+++ b/config/zabbix-lts/zabbix-lts.inc
@@ -38,6 +38,15 @@ require_once("functions.inc");
require_once("pkg-utils.inc");
require_once("globals.inc");
+$pf_version=substr(trim(file_get_contents("/etc/version")),0,3);
+if ($pf_version == "2.1" || $pf_version == "2.2") {
+ define('ZABBIX_AGENT_BASE', '/usr/pbi/zabbix22-agent-' . php_uname("m"));
+ define('ZABBIX_PROXY_BASE', '/usr/pbi/zabbix22-proxy-' . php_uname("m"));
+} else {
+ define('ZABBIX_AGENT_BASE', '/usr/local');
+ define('ZABBIX_AGENT_BASE', '/usr/local');
+}
+
function php_install_zabbix_lts(){
sync_package_zabbix_lts();
}
@@ -47,8 +56,6 @@ function php_deinstall_zabbix_agent_lts(){
conf_mount_rw();
- define('ZABBIX_AGENT_BASE', '/usr/pbi/zabbix22-agent-' . php_uname("m"));
-
exec("/usr/bin/killall zabbix_agentd");
unlink_if_exists(ZABBIX_AGENT_BASE . "/etc/rc.d/zabbix_agentd_lts.sh");
unlink_if_exists(ZABBIX_AGENT_BASE . "/etc/zabbix22/zabbix_agentd.conf");
@@ -70,8 +77,6 @@ function php_deinstall_zabbix_proxy_lts(){
conf_mount_rw();
- define('ZABBIX_PROXY_BASE', '/usr/pbi/zabbix22-proxy-' . php_uname("m"));
-
exec("/usr/bin/killall zabbix_proxy");
unlink_if_exists(ZABBIX_PROXY_BASE . "/etc/rc.d/zabbix_proxy_lts.sh");
unlink_if_exists(ZABBIX_PROXY_BASE . "/etc/zabbix22/zabbix_proxy.conf");
@@ -170,9 +175,6 @@ function sync_package_zabbix_lts(){
conf_mount_rw();
- define('ZABBIX_AGENT_BASE', '/usr/pbi/zabbix22-agent-' . php_uname("m"));
- define('ZABBIX_PROXY_BASE', '/usr/pbi/zabbix22-proxy-' . php_uname("m"));
-
#check zabbix proxy config
if (is_array($config['installedpackages']['zabbixproxylts'])){
$zbproxy_config = $config['installedpackages']['zabbixproxylts']['config'][0];