aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJim P <jim@pingle.org>2013-10-10 21:05:31 -0700
committerJim P <jim@pingle.org>2013-10-10 21:05:31 -0700
commitdaa6a3955ca8578f9af0534865d5c38a45ed9677 (patch)
tree4eab114db133d60ffb572ec144cc96340fa4cae0
parent6aea580bbd10faf6e19678de42f800f060c316c4 (diff)
parentc0439ba2e20f7829520a0e807f9c5474e344b3b9 (diff)
downloadpfsense-packages-daa6a3955ca8578f9af0534865d5c38a45ed9677.tar.gz
pfsense-packages-daa6a3955ca8578f9af0534865d5c38a45ed9677.tar.bz2
pfsense-packages-daa6a3955ca8578f9af0534865d5c38a45ed9677.zip
Merge pull request #525 from dbaio/master
zabbix2 packages - update and fix deinstall issue
-rw-r--r--config/zabbix2/zabbix2-agent.xml4
-rw-r--r--config/zabbix2/zabbix2-proxy.xml4
-rw-r--r--config/zabbix2/zabbix2.inc85
-rw-r--r--pkg_config.8.xml12
-rw-r--r--pkg_config.8.xml.amd6412
5 files changed, 70 insertions, 47 deletions
diff --git a/config/zabbix2/zabbix2-agent.xml b/config/zabbix2/zabbix2-agent.xml
index 55273a81..61e0f52f 100644
--- a/config/zabbix2/zabbix2-agent.xml
+++ b/config/zabbix2/zabbix2-agent.xml
@@ -41,7 +41,7 @@
<name>zabbixagent</name>
<title>Services: Zabbix-2 Agent</title>
<category>Monitoring</category>
- <version>0.7</version>
+ <version>0.7_1</version>
<include_file>/usr/local/pkg/zabbix2.inc</include_file>
<addedit_string>Zabbix Agent has been created/modified.</addedit_string>
<delete_string>Zabbix Agent has been deleted.</delete_string>
@@ -179,5 +179,5 @@
<custom_php_validation_command>validate_input_zabbix2($_POST, &amp;$input_errors);</custom_php_validation_command>
<custom_add_php_command></custom_add_php_command>
<custom_php_resync_config_command>sync_package_zabbix2();</custom_php_resync_config_command>
- <custom_php_deinstall_command>php_deinstall_zabbix2();</custom_php_deinstall_command>
+ <custom_php_deinstall_command>php_deinstall_zabbix2_agent();</custom_php_deinstall_command>
</packagegui>
diff --git a/config/zabbix2/zabbix2-proxy.xml b/config/zabbix2/zabbix2-proxy.xml
index fcabedd9..d9402bac 100644
--- a/config/zabbix2/zabbix2-proxy.xml
+++ b/config/zabbix2/zabbix2-proxy.xml
@@ -41,7 +41,7 @@
<name>zabbixproxy</name>
<title>Services: Zabbix-2 Proxy</title>
<category>Monitoring</category>
- <version>0.7</version>
+ <version>0.7_1</version>
<include_file>/usr/local/pkg/zabbix2.inc</include_file>
<addedit_string>Zabbix Proxy has been created/modified.</addedit_string>
<delete_string>Zabbix Proxy has been deleted.</delete_string>
@@ -137,5 +137,5 @@
<custom_php_validation_command>validate_input_zabbix2($_POST, &amp;$input_errors);</custom_php_validation_command>
<custom_add_php_command></custom_add_php_command>
<custom_php_resync_config_command>sync_package_zabbix2();</custom_php_resync_config_command>
- <custom_php_deinstall_command>php_deinstall_zabbix2();</custom_php_deinstall_command>
+ <custom_php_deinstall_command>php_deinstall_zabbix2_proxy();</custom_php_deinstall_command>
</packagegui>
diff --git a/config/zabbix2/zabbix2.inc b/config/zabbix2/zabbix2.inc
index 730ef873..34777387 100644
--- a/config/zabbix2/zabbix2.inc
+++ b/config/zabbix2/zabbix2.inc
@@ -42,38 +42,61 @@ function php_install_zabbix2(){
sync_package_zabbix2();
}
-function php_deinstall_zabbix2(){
- global $config, $g;
+function php_deinstall_zabbix2_agent(){
+ global $config, $g;
- 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_PROXY_BASE', '/usr/pbi/zabbix2-proxy-' . php_uname("m"));
- } else {
- define('ZABBIX_AGENT_BASE', '/usr/local');
- 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("/var/log/zabbix2/zabbix_proxy.log");
- unlink_if_exists("/var/run/zabbix2/zabbix2_proxy.pid");
-
- 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("/var/log/zabbix2/zabbix2_agentd.log");
- unlink_if_exists("/var/run/zabbix2/zabbix2_agentd.pid");
-
- if (is_dir("/var/log/zabbix2"))
- exec("/bin/rm -r /var/log/zabbix2/");
- if (is_dir("/var/run/zabbix2"))
- exec("/bin/rm -r /var/run/zabbix2/");
- if (is_dir("/var/db/zabbix2"))
- exec("/bin/rm -r /var/db/zabbix2/");
- conf_mount_ro();
+ 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"));
+ } 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("/var/log/zabbix2/zabbix2_agentd.log");
+ unlink_if_exists("/var/run/zabbix2/zabbix2_agentd.pid");
+
+ if (!is_array($config['installedpackages']['zabbixproxy'])){
+ if (is_dir("/var/log/zabbix2"))
+ exec("/bin/rm -r /var/log/zabbix2/");
+ if (is_dir("/var/run/zabbix2"))
+ exec("/bin/rm -r /var/run/zabbix2/");
+ }
+
+ conf_mount_ro();
+}
+
+function php_deinstall_zabbix2_proxy(){
+ global $config, $g;
+
+ 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"));
+ } 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("/var/log/zabbix2/zabbix_proxy.log");
+ unlink_if_exists("/var/run/zabbix2/zabbix2_proxy.pid");
+
+ if (!is_array($config['installedpackages']['zabbixagent'])){
+ if (is_dir("/var/log/zabbix2"))
+ exec("/bin/rm -r /var/log/zabbix2/");
+ if (is_dir("/var/run/zabbix2"))
+ exec("/bin/rm -r /var/run/zabbix2/");
+ }
+
+ if (is_dir("/var/db/zabbix2"))
+ exec("/bin/rm -r /var/db/zabbix2/");
+
+ conf_mount_ro();
}
function validate_input_zabbix2($post,&$input_errors){
diff --git a/pkg_config.8.xml b/pkg_config.8.xml
index 343584f5..d2576fd5 100644
--- a/pkg_config.8.xml
+++ b/pkg_config.8.xml
@@ -1901,7 +1901,7 @@
<descr>Monitoring agent.</descr>
<category>Services</category>
<config_file>http://www.pfsense.org/packages/config/zabbix2/zabbix2-agent.xml</config_file>
- <version>zabbix2-agent-2.0.4 pkg v0.6_3</version>
+ <version>zabbix2-agent-2.0.8 pkg v0.7_1</version>
<status>BETA</status>
<required_version>2.0</required_version>
<configurationfile>zabbix2-agent.xml</configurationfile>
@@ -1912,15 +1912,15 @@
<port>net-mgmt/zabbix2-agent</port>
</build_pbi>
<depends_on_package_base_url>http://files.pfsense.org/packages/8/All/</depends_on_package_base_url>
- <depends_on_package>zabbix2-agent-2.0.4.tbz</depends_on_package>
- <depends_on_package_pbi>zabbix2-agent-2.0.4-i386.pbi</depends_on_package_pbi>
+ <depends_on_package>zabbix2-agent-2.0.8.tbz</depends_on_package>
+ <depends_on_package_pbi>zabbix2-agent-2.0.8-i386.pbi</depends_on_package_pbi>
</package>
<package>
<name>Zabbix-2 Proxy</name>
<descr>Monitoring agent proxy.</descr>
<category>Services</category>
<config_file>http://www.pfsense.org/packages/config/zabbix2/zabbix2-proxy.xml</config_file>
- <version>zabbix2-proxy-2.0.4 pkg v0.6_2</version>
+ <version>zabbix2-proxy-2.0.8 pkg v0.7_1</version>
<status>BETA</status>
<required_version>2.0</required_version>
<configurationfile>zabbix2-proxy.xml</configurationfile>
@@ -1932,8 +1932,8 @@
</build_pbi>
<build_options>OPTIONS_SET+= SQLITE;OPTIONS_UNSET+= MYSQL JABBER LDAP</build_options>
<depends_on_package_base_url>http://files.pfsense.org/packages/8/All/</depends_on_package_base_url>
- <depends_on_package>zabbix2-proxy-2.0.4.tbz</depends_on_package>
- <depends_on_package_pbi>zabbix2-proxy-2.0.4-i386.pbi</depends_on_package_pbi>
+ <depends_on_package>zabbix2-proxy-2.0.8.tbz</depends_on_package>
+ <depends_on_package_pbi>zabbix2-proxy-2.0.8-i386.pbi</depends_on_package_pbi>
</package>
<package>
<!-- This does not exist yet, this is here to trigger a PBI build -->
diff --git a/pkg_config.8.xml.amd64 b/pkg_config.8.xml.amd64
index cf707315..d72f5479 100644
--- a/pkg_config.8.xml.amd64
+++ b/pkg_config.8.xml.amd64
@@ -1888,7 +1888,7 @@
<descr>Monitoring agent.</descr>
<category>Services</category>
<config_file>http://www.pfsense.org/packages/config/zabbix2/zabbix2-agent.xml</config_file>
- <version>zabbix2-agent-2.0.4 pkg v0.6_3</version>
+ <version>zabbix2-agent-2.0.8 pkg v0.7_1</version>
<status>BETA</status>
<required_version>2.0</required_version>
<configurationfile>zabbix2-agent.xml</configurationfile>
@@ -1899,15 +1899,15 @@
<port>net-mgmt/zabbix2-agent</port>
</build_pbi>
<depends_on_package_base_url>http://files.pfsense.org/packages/amd64/8/All/</depends_on_package_base_url>
- <depends_on_package>zabbix2-agent-2.0.4.tbz</depends_on_package>
- <depends_on_package_pbi>zabbix2-agent-2.0.4-amd64.pbi</depends_on_package_pbi>
+ <depends_on_package>zabbix2-agent-2.0.8.tbz</depends_on_package>
+ <depends_on_package_pbi>zabbix2-agent-2.0.8-amd64.pbi</depends_on_package_pbi>
</package>
<package>
<name>Zabbix-2 Proxy</name>
<descr>Monitoring agent proxy.</descr>
<category>Services</category>
<config_file>http://www.pfsense.org/packages/config/zabbix2/zabbix2-proxy.xml</config_file>
- <version>zabbix2-proxy-2.0.4 pkg v0.6_2</version>
+ <version>zabbix2-proxy-2.0.8 pkg v0.7_1</version>
<status>BETA</status>
<required_version>2.0</required_version>
<configurationfile>zabbix2-proxy.xml</configurationfile>
@@ -1919,8 +1919,8 @@
</build_pbi>
<build_options>OPTIONS_SET+= SQLITE;OPTIONS_UNSET+= MYSQL JABBER LDAP</build_options>
<depends_on_package_base_url>http://files.pfsense.org/packages/amd64/8/All/</depends_on_package_base_url>
- <depends_on_package>zabbix2-proxy-2.0.4.tbz</depends_on_package>
- <depends_on_package_pbi>zabbix2-proxy-2.0.4-amd64.pbi</depends_on_package_pbi>
+ <depends_on_package>zabbix2-proxy-2.0.8.tbz</depends_on_package>
+ <depends_on_package_pbi>zabbix2-proxy-2.0.8-amd64.pbi</depends_on_package_pbi>
</package>
<package>
<!-- This does not exist yet, this is here to trigger a PBI build -->