aboutsummaryrefslogtreecommitdiffstats
path: root/config/haproxy-devel/pkg/haproxy.inc
diff options
context:
space:
mode:
authorRenato Botelho <garga@FreeBSD.org>2015-04-23 09:45:00 -0300
committerRenato Botelho <garga@FreeBSD.org>2015-04-23 09:45:00 -0300
commit668c8abc54d02c473c9e272c22995d636149960f (patch)
tree53db5e5ff34b8956eb8e5e8e8bab886ed098d944 /config/haproxy-devel/pkg/haproxy.inc
parent9a6c8e8fd1cf53143501ca9480d54fa49181a507 (diff)
downloadpfsense-packages-668c8abc54d02c473c9e272c22995d636149960f.tar.gz
pfsense-packages-668c8abc54d02c473c9e272c22995d636149960f.tar.bz2
pfsense-packages-668c8abc54d02c473c9e272c22995d636149960f.zip
2.3+ won't use PBI anymore
Diffstat (limited to 'config/haproxy-devel/pkg/haproxy.inc')
-rw-r--r--config/haproxy-devel/pkg/haproxy.inc8
1 files changed, 7 insertions, 1 deletions
diff --git a/config/haproxy-devel/pkg/haproxy.inc b/config/haproxy-devel/pkg/haproxy.inc
index 135f2d4f..f8aab3b1 100644
--- a/config/haproxy-devel/pkg/haproxy.inc
+++ b/config/haproxy-devel/pkg/haproxy.inc
@@ -362,6 +362,12 @@ function haproxy_custom_php_install_command() {
update_output_window($static_output);
conf_mount_rw();
+ $pf_version=substr(trim(file_get_contents("/etc/version")),0,3);
+ if ($pf_version == "2.1" || $pf_version == "2.2")
+ $haproxy_binary = "/usr/pbi/haproxy-devel-" . php_uname("m") . "/sbin/haproxy";
+ else
+ $haproxy_binary = "/usr/local/sbin/haproxy";
+
$static_output .= "HAProxy, create '/usr/local/etc/rc.d/haproxy.sh'\n";
update_output_window($static_output);
$haproxy = <<<EOD
@@ -375,7 +381,7 @@ function haproxy_custom_php_install_command() {
name="haproxy"
rcvar="\${name}_enable"
-command="/usr/pbi/haproxy-devel-`uname -m`/sbin/haproxy"
+command="{$haproxy_binary}"
haproxy_enable=\${haproxy-"YES"}
start_cmd="haproxy_start"