aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRenato Botelho <garga@pfSense.org>2014-03-04 09:15:56 -0300
committerRenato Botelho <garga@pfSense.org>2014-03-04 09:15:56 -0300
commit4335125b656b1f00740c8c97b916c76aa62ff8c8 (patch)
tree7cdb18d16d1a9e55d871fc3341d9b70a2f8cc8fb
parent2f7e0859c6d8f6024c5648249eb4c849ddec14bd (diff)
parent2799c464e83a4039e61b86429fd1cc3de22b6162 (diff)
downloadpfsense-packages-4335125b656b1f00740c8c97b916c76aa62ff8c8.tar.gz
pfsense-packages-4335125b656b1f00740c8c97b916c76aa62ff8c8.tar.bz2
pfsense-packages-4335125b656b1f00740c8c97b916c76aa62ff8c8.zip
Merge pull request #613 from rmiddle/master
Add an Advanced Parameters to the proxy settings.
-rw-r--r--config/zabbix2/zabbix2-proxy.xml10
-rw-r--r--config/zabbix2/zabbix2.inc2
2 files changed, 12 insertions, 0 deletions
diff --git a/config/zabbix2/zabbix2-proxy.xml b/config/zabbix2/zabbix2-proxy.xml
index c857bec1..8dc41e4e 100644
--- a/config/zabbix2/zabbix2-proxy.xml
+++ b/config/zabbix2/zabbix2-proxy.xml
@@ -129,6 +129,16 @@
<size>10</size>
<required>true</required>
</field>
+ <field>
+ <fielddescr>Advanced Parameters</fielddescr>
+ <fieldname>advancedparams</fieldname>
+ <encoding>base64</encoding>
+ <type>textarea</type>
+ <rows>5</rows>
+ <cols>50</cols>
+ <description>Advanced paramete. There are some rearly used parameters that sometimes need defined. Value has form, example: StartDiscoverers=10</description>
+ </field>
+
</fields>
<custom_php_install_command>sync_package_zabbix2();</custom_php_install_command>
<custom_php_command_before_form></custom_php_command_before_form>
diff --git a/config/zabbix2/zabbix2.inc b/config/zabbix2/zabbix2.inc
index 92aad309..c08c5487 100644
--- a/config/zabbix2/zabbix2.inc
+++ b/config/zabbix2/zabbix2.inc
@@ -193,6 +193,7 @@ function sync_package_zabbix2(){
$zbproxy_config = $config['installedpackages']['zabbixproxy']['config'][0];
if ($zbproxy_config['proxyenabled']=="on"){
$Mode=(is_numericint($zbproxy_config['proxymode'])?$zbproxy_config['proxymode'] : 0);
+ $AdvancedParams=base64_decode($zbagent_config['advancedparams']);
$zbproxy_conf_file = <<< EOF
Server={$zbproxy_config['server']}
@@ -206,6 +207,7 @@ FpingLocation=/usr/local/sbin/fping
#there's currently no fping6 (IPv6) dependency in the package, but if there was, the binary would likely also be in /usr/local/sbin
Fping6Location=/usr/local/sbin/fping6
ProxyMode={$Mode}
+{$AdvancedParams}
EOF;
file_put_contents(ZABBIX_PROXY_BASE . "/etc/zabbix22/zabbix_proxy.conf", strtr($zbproxy_conf_file, array("\r" => "")));