aboutsummaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
authorJim P <jim@pingle.org>2013-02-19 08:33:58 -0800
committerJim P <jim@pingle.org>2013-02-19 08:33:58 -0800
commit0886c469fca958d28735ccc97a1fa4ff3f059db0 (patch)
tree5d2a4c62b62222e523595fdfd6f058daf3168240 /config
parent52795d868e16484fb49f31f492a202f143129494 (diff)
parent7cd9fcf90273297b8374719528ebb44e611a3763 (diff)
downloadpfsense-packages-0886c469fca958d28735ccc97a1fa4ff3f059db0.tar.gz
pfsense-packages-0886c469fca958d28735ccc97a1fa4ff3f059db0.tar.bz2
pfsense-packages-0886c469fca958d28735ccc97a1fa4ff3f059db0.zip
Merge pull request #388 from dbaio/master
zabbix2 - fix sync and rcfile
Diffstat (limited to 'config')
-rw-r--r--config/zabbix2/zabbix2.inc15
1 files changed, 8 insertions, 7 deletions
diff --git a/config/zabbix2/zabbix2.inc b/config/zabbix2/zabbix2.inc
index af5b3545..730ef873 100644
--- a/config/zabbix2/zabbix2.inc
+++ b/config/zabbix2/zabbix2.inc
@@ -154,9 +154,10 @@ function sync_package_zabbix2(){
define('ZABBIX_AGENT_BASE', '/usr/pbi/zabbix2-agent-' . php_uname("m"));
define('ZABBIX_PROXY_BASE', '/usr/pbi/zabbix2-proxy-' . php_uname("m"));
}
- else
+ else {
define('ZABBIX_AGENT_BASE', '/usr/local');
define('ZABBIX_PROXY_BASE', '/usr/local');
+ }
#check zabbix proxy config
if (is_array($config['installedpackages']['zabbixproxy'])){
@@ -287,17 +288,18 @@ EOF;
$zproxy_rcfile="/usr/local/etc/rc.d/zabbix2_proxy.sh";
if (is_array($zbproxy_config) && $zbproxy_config['proxyenabled']=="on"){
- $zproxy_start= strtr($dir_checks, array("\r" => "")). "echo \"Starting Zabbix Proxy\"...\n";
+ $zproxy_start= strtr($dir_checks, array("\r" => "")). "\necho \"Starting Zabbix Proxy\"...\n";
/* start zabbix proxy */
$zproxy_start .= ZABBIX_PROXY_BASE . "/sbin/zabbix_proxy\n";
$zproxy_stop = "echo \"Stopping Zabbix Proxy\"\n";
- $zproxy_stop .= "/usr/bin/killall zabbix_proxy\n";
+ $zproxy_stop .= "/usr/bin/killall zabbix_proxy\n";
+ $zproxy_stop .= "/bin/sleep 5\n";
+
/* write out rc.d start/stop file */
write_rcfile(array(
"file" => "zabbix2_proxy.sh",
"start" => $zproxy_start,
- "restart" => $zproxy_stop . "\nsleep 5\n" . $zproxy_start,
"stop" => $zproxy_stop
)
);
@@ -311,7 +313,7 @@ EOF;
$zagent_rcfile="/usr/local/etc/rc.d/zabbix2_agentd.sh";
if (is_array($zbagent_config) && $zbagent_config['agentenabled']=="on"){
- $zagent_start .= strtr($dir_checks, array("\r" => "")). "echo \"Starting Zabbix Agent...\"\n";
+ $zagent_start .= strtr($dir_checks, array("\r" => "")). "\necho \"Starting Zabbix Agent...\"\n";
$zagent_start .= ZABBIX_AGENT_BASE . "/sbin/zabbix_agentd\n";
$zagent_stop = "echo \"Stopping Zabbix Agent...\"\n";
@@ -322,7 +324,6 @@ EOF;
write_rcfile(array(
"file" => "zabbix2_agentd.sh",
"start" => "$zagent_start",
- "restart" => "$zagent_stop\n" . "sleep 5\n" . "{$zagent_start}",
"stop" => "$zagent_stop"
)
);
@@ -336,4 +337,4 @@ EOF;
conf_mount_ro();
}
-?> \ No newline at end of file
+?>