diff options
-rw-r--r-- | config/zabbix-agent-lts/zabbix-agent-lts.xml | 3 | ||||
-rw-r--r-- | config/zabbix-proxy-lts/zabbix-proxy-lts.inc | 59 | ||||
-rw-r--r-- | config/zabbix-proxy-lts/zabbix-proxy-lts.xml | 3 | ||||
-rw-r--r-- | pkg_config.10.xml | 4 |
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> |