From 8e68c01b66dfba4317b035245b38e3bfb4219883 Mon Sep 17 00:00:00 2001
From: "Hahn Axel (hahn)" <axel.hahn@unibe.ch>
Date: Fri, 9 Jun 2023 13:45:12 +0200
Subject: [PATCH] fix haproxy port: take the 1st line

---
 inc_haproxy_cfg.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
 mode change 100644 => 100755 inc_haproxy_cfg.sh

diff --git a/inc_haproxy_cfg.sh b/inc_haproxy_cfg.sh
old mode 100644
new mode 100755
index 9fe049d..af5e1d9
--- a/inc_haproxy_cfg.sh
+++ b/inc_haproxy_cfg.sh
@@ -140,8 +140,8 @@ function getStatsBaseUrl(){
     local mysection=$( detectStatsSection )
 
     # read config
-    port=$( getCfgVar "bind"  "${mysection}" | cut -f 2 -d ":")
-    auth=$( getCfgVar "stats" "${mysection}" | grep "^auth" | cut -f 2- -d " " )
+    port=$( getCfgVar "bind"  "${mysection}" | cut -f 2 -d ":" | head -1 )
+    auth=$( getCfgVar "stats" "${mysection}" | grep "^auth" | cut -f 2- -d " " | head -1 )
 
     # build url
     url="$proto://"
-- 
GitLab