aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRenato Botelho <garga@FreeBSD.org>2015-05-15 17:14:49 -0300
committerRenato Botelho <garga@FreeBSD.org>2015-05-15 17:14:49 -0300
commit2719171d1427d3cc76cd29ff30c2eabb711347f9 (patch)
tree8640f5ebaa0b2e170ee996ff8d30b3ba7a8b92fc
parent6a6e06d88bf06a917175efd75de4999817be1937 (diff)
parent6d90f354c42b77d74a4ef7271acffcaec8dcabb2 (diff)
downloadpfsense-packages-2719171d1427d3cc76cd29ff30c2eabb711347f9.tar.gz
pfsense-packages-2719171d1427d3cc76cd29ff30c2eabb711347f9.tar.bz2
pfsense-packages-2719171d1427d3cc76cd29ff30c2eabb711347f9.zip
Merge pull request #878 from dbaio/zabbix_rc2
-rw-r--r--config/zabbix-agent-lts/zabbix-agent-lts.xml3
-rw-r--r--config/zabbix-proxy-lts/zabbix-proxy-lts.inc59
-rw-r--r--config/zabbix-proxy-lts/zabbix-proxy-lts.xml3
-rw-r--r--pkg_config.10.xml4
4 files changed, 38 insertions, 31 deletions
diff --git a/config/zabbix-agent-lts/zabbix-agent-lts.xml b/config/zabbix-agent-lts/zabbix-agent-lts.xml
index b24e2aa2..c58ac04c 100644
--- a/config/zabbix-agent-lts/zabbix-agent-lts.xml
+++ b/config/zabbix-agent-lts/zabbix-agent-lts.xml
@@ -41,11 +41,10 @@
<name>zabbixagentlts</name>
<title>Services: Zabbix Agent LTS</title>
<category>Monitoring</category>
- <version>0.8.4</version>
+ <version>0.8.5</version>
<include_file>/usr/local/pkg/zabbix-agent-lts.inc</include_file>
<addedit_string>Zabbix Agent LTS has been created/modified.</addedit_string>
<delete_string>Zabbix Agent LTS has been deleted.</delete_string>
- <restart_command>/usr/local/etc/rc.d/zabbix_agentd_lts.sh restart</restart_command>
<additional_files_needed>
<item>https://packages.pfsense.org/packages/config/zabbix-agent-lts/zabbix-agent-lts.inc</item>
<prefix>/usr/local/pkg/</prefix>
diff --git a/config/zabbix-proxy-lts/zabbix-proxy-lts.inc b/config/zabbix-proxy-lts/zabbix-proxy-lts.inc
index 3fc71a84..bc9864f4 100644
--- a/config/zabbix-proxy-lts/zabbix-proxy-lts.inc
+++ b/config/zabbix-proxy-lts/zabbix-proxy-lts.inc
@@ -174,38 +174,47 @@ EOF;
exec("/bin/mkdir -p " . ZABBIX_PROXY_BASE . "/etc/zabbix22");
$dir_checks = <<< EOF
-if [ ! -d /var/log/zabbix-proxy-lts ]
- then
- /bin/mkdir -p /var/log/zabbix-proxy-lts
- /usr/sbin/chmod 755 /var/log/zabbix-proxy-lts
- fi
-/usr/sbin/chown -R zabbix:zabbix /var/log/zabbix-proxy-lts
-
-if [ ! -d /var/run/zabbix-proxy-lts ]
- then
- /bin/mkdir -p /var/run/zabbix-proxy-lts
- /usr/sbin/chmod 755 /var/run/zabbix-proxy-lts
- fi
-/usr/sbin/chown -R zabbix:zabbix /var/run/zabbix-proxy-lts
-
-if [ ! -d /var/db/zabbix-proxy-lts ]
- then
- /bin/mkdir -p /var/db/zabbix-proxy-lts
- /usr/sbin/chmod 755 /var/db/zabbix-proxy-lts
- fi
-/usr/sbin/chown -R zabbix:zabbix /var/db/zabbix-proxy-lts
+
+ if [ ! -d /var/log/zabbix-proxy-lts ]; then
+ /bin/mkdir -p /var/log/zabbix-proxy-lts
+ /usr/sbin/chmod 755 /var/log/zabbix-proxy-lts
+ fi
+ /usr/sbin/chown -R zabbix:zabbix /var/log/zabbix-proxy-lts
+
+ if [ ! -d /var/run/zabbix-proxy-lts ]; then
+ /bin/mkdir -p /var/run/zabbix-proxy-lts
+ /usr/sbin/chmod 755 /var/run/zabbix-proxy-lts
+ fi
+ /usr/sbin/chown -R zabbix:zabbix /var/run/zabbix-proxy-lts
+
+ if [ ! -d /var/db/zabbix-proxy-lts ]; then
+ /bin/mkdir -p /var/db/zabbix-proxy-lts
+ /usr/sbin/chmod 755 /var/db/zabbix-proxy-lts
+ fi
+ /usr/sbin/chown -R zabbix:zabbix /var/db/zabbix-proxy-lts
+
+EOF;
+
+ $pid_check = <<< EOF
+
+ /bin/pgrep -anx zabbix_proxy 2>/dev/null
+ if [ "\$?" -eq "0" ]; then
+ /usr/bin/killall -9 zabbix_proxy
+ /bin/rm -f /var/run/zabbix-proxy-lts/zabbix_proxy_lts.pid
+ fi
EOF;
$zproxy_rcfile="/usr/local/etc/rc.d/zabbix_proxy_lts.sh";
if (is_array($zbproxy_config) && $zbproxy_config['proxyenabled']=="on"){
- $zproxy_start= strtr($dir_checks, array("\r" => "")). "\necho \"Starting Zabbix Proxy LTS\"...\n";
- /* start zabbix proxy */
- $zproxy_start .= ZABBIX_PROXY_BASE . "/sbin/zabbix_proxy\n";
+ $zproxy_start = strtr($dir_checks, array("\r" => ""));
+ $zproxy_start .= "\techo \"Starting Zabbix Proxy LTS\"...\n";
+ $zproxy_start .= "\t" . ZABBIX_PROXY_BASE . "/sbin/zabbix_proxy\n";
$zproxy_stop = "echo \"Stopping Zabbix Proxy LTS\"\n";
- $zproxy_stop .= "/usr/bin/killall zabbix_proxy\n";
- $zproxy_stop .= "/bin/sleep 5\n";
+ $zproxy_stop .= "\t/usr/bin/killall zabbix_proxy\n";
+ $zproxy_stop .= "\t/bin/sleep 5\n";
+ $zproxy_stop .= strtr($pid_check, array("\r" => ""));
/* write out rc.d start/stop file */
write_rcfile(array(
diff --git a/config/zabbix-proxy-lts/zabbix-proxy-lts.xml b/config/zabbix-proxy-lts/zabbix-proxy-lts.xml
index 089ccb0a..15111aa5 100644
--- a/config/zabbix-proxy-lts/zabbix-proxy-lts.xml
+++ b/config/zabbix-proxy-lts/zabbix-proxy-lts.xml
@@ -41,11 +41,10 @@
<name>zabbixproxylts</name>
<title>Services: Zabbix Proxy LTS</title>
<category>Monitoring</category>
- <version>0.8.4</version>
+ <version>0.8.5</version>
<include_file>/usr/local/pkg/zabbix-proxy-lts.inc</include_file>
<addedit_string>Zabbix Proxy has been created/modified.</addedit_string>
<delete_string>Zabbix Proxy has been deleted.</delete_string>
- <restart_command>/usr/local/etc/rc.d/zabbix_proxy_lts.sh restart</restart_command>
<additional_files_needed>
<item>https://packages.pfsense.org/packages/config/zabbix-proxy-lts/zabbix-proxy-lts.inc</item>
<prefix>/usr/local/pkg/</prefix>
diff --git a/pkg_config.10.xml b/pkg_config.10.xml
index cb805980..7058f4dc 100644
--- a/pkg_config.10.xml
+++ b/pkg_config.10.xml
@@ -1461,7 +1461,7 @@
will result in change of the first version number. More info in http://www.zabbix.com/life_cycle_and_release_policy.php </descr>
<category>Services</category>
<config_file>https://packages.pfsense.org/packages/config/zabbix-agent-lts/zabbix-agent-lts.xml</config_file>
- <version>0.8.4</version>
+ <version>0.8.5</version>
<status>BETA</status>
<required_version>2.2</required_version>
<configurationfile>zabbix-agent-lts.xml</configurationfile>
@@ -1483,7 +1483,7 @@
will result in change of the first version number. More info in http://www.zabbix.com/life_cycle_and_release_policy.php </descr>
<category>Services</category>
<config_file>https://packages.pfsense.org/packages/config/zabbix-proxy-lts/zabbix-proxy-lts.xml</config_file>
- <version>0.8.4</version>
+ <version>0.8.5</version>
<status>BETA</status>
<required_version>2.2</required_version>
<configurationfile>zabbix-proxy-lts.xml</configurationfile>