diff options
Diffstat (limited to 'config/zabbix2/zabbix2.inc')
-rw-r--r-- | config/zabbix2/zabbix2.inc | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/config/zabbix2/zabbix2.inc b/config/zabbix2/zabbix2.inc index 0a1c12be..92aad309 100644 --- a/config/zabbix2/zabbix2.inc +++ b/config/zabbix2/zabbix2.inc @@ -48,14 +48,14 @@ function php_deinstall_zabbix2_agent(){ conf_mount_rw(); $pfs_version = substr(trim(file_get_contents("/etc/version")),0,3); if ($pfs_version > 2.0){ - define('ZABBIX_AGENT_BASE', '/usr/pbi/zabbix2-agent-' . php_uname("m")); + define('ZABBIX_AGENT_BASE', '/usr/pbi/zabbix22-agent-' . php_uname("m")); } else { define('ZABBIX_AGENT_BASE', '/usr/local'); } exec("/usr/bin/killall zabbix_agentd"); unlink_if_exists(ZABBIX_AGENT_BASE . "/etc/rc.d/zabbix2_agentd.sh"); - unlink_if_exists(ZABBIX_AGENT_BASE . "/etc/zabbix2/zabbix_agentd.conf"); + unlink_if_exists(ZABBIX_AGENT_BASE . "/etc/zabbix22/zabbix_agentd.conf"); unlink_if_exists("/var/log/zabbix2/zabbix2_agentd.log"); unlink_if_exists("/var/run/zabbix2/zabbix2_agentd.pid"); @@ -75,14 +75,14 @@ function php_deinstall_zabbix2_proxy(){ conf_mount_rw(); $pfs_version = substr(trim(file_get_contents("/etc/version")),0,3); if ($pfs_version > 2.0){ - define('ZABBIX_PROXY_BASE', '/usr/pbi/zabbix2-proxy-' . php_uname("m")); + define('ZABBIX_PROXY_BASE', '/usr/pbi/zabbix22-proxy-' . php_uname("m")); } else { define('ZABBIX_PROXY_BASE', '/usr/local'); } exec("/usr/bin/killall zabbix_proxy"); unlink_if_exists(ZABBIX_PROXY_BASE . "/etc/rc.d/zabbix2_proxy.sh"); - unlink_if_exists(ZABBIX_PROXY_BASE . "/etc/zabbix2/zabbix_proxy.conf"); + unlink_if_exists(ZABBIX_PROXY_BASE . "/etc/zabbix22/zabbix_proxy.conf"); unlink_if_exists("/var/log/zabbix2/zabbix_proxy.log"); unlink_if_exists("/var/run/zabbix2/zabbix2_proxy.pid"); @@ -180,8 +180,8 @@ function sync_package_zabbix2(){ #check pfsense version $pfs_version = substr(trim(file_get_contents("/etc/version")),0,3); if ($pfs_version > 2.0){ - define('ZABBIX_AGENT_BASE', '/usr/pbi/zabbix2-agent-' . php_uname("m")); - define('ZABBIX_PROXY_BASE', '/usr/pbi/zabbix2-proxy-' . php_uname("m")); + 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'); @@ -208,7 +208,7 @@ Fping6Location=/usr/local/sbin/fping6 ProxyMode={$Mode} EOF; - file_put_contents(ZABBIX_PROXY_BASE . "/etc/zabbix2/zabbix_proxy.conf", strtr($zbproxy_conf_file, array("\r" => ""))); + file_put_contents(ZABBIX_PROXY_BASE . "/etc/zabbix22/zabbix_proxy.conf", strtr($zbproxy_conf_file, array("\r" => ""))); } } /* check zabbix agent settings*/ @@ -242,7 +242,7 @@ StartAgents={$StartAgents} {$UserParams} EOF; - file_put_contents(ZABBIX_AGENT_BASE . "/etc/zabbix2/zabbix_agentd.conf", strtr($zbagent_conf_file, array("\r" => ""))); + file_put_contents(ZABBIX_AGENT_BASE . "/etc/zabbix22/zabbix_agentd.conf", strtr($zbagent_conf_file, array("\r" => ""))); } } $want_sysctls = array( @@ -291,8 +291,8 @@ EOF; /*check startup script files*/ /* create a few directories and ensure the sample files are in place */ - if (!is_dir(ZABBIX_PROXY_BASE . "/etc/zabbix2")) - exec("/bin/mkdir -p " . ZABBIX_PROXY_BASE . "/etc/zabbix2"); + if (!is_dir(ZABBIX_PROXY_BASE . "/etc/zabbix22")) + exec("/bin/mkdir -p " . ZABBIX_PROXY_BASE . "/etc/zabbix22"); $dir_checks = <<< EOF if [ ! -d /var/log/zabbix2 ] |